mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
OpenGL: Only load the core API by default
See the breaking changes document for more details.
This commit is contained in:
parent
8022356d2b
commit
80239b4d50
5 changed files with 72 additions and 2 deletions
|
|
@ -4,6 +4,28 @@ JUCE breaking changes
|
|||
Develop
|
||||
=======
|
||||
|
||||
Change
|
||||
------
|
||||
juce::gl::loadFunctions() no longer loads extension functions.
|
||||
|
||||
Possible Issues
|
||||
---------------
|
||||
Code that depended on extension functions being loaded automatically may cease
|
||||
to function correctly.
|
||||
|
||||
Workaround
|
||||
----------
|
||||
Extension functions can now be loaded using juce::gl::loadExtensions().
|
||||
|
||||
Rationale
|
||||
---------
|
||||
There are a great number of extension functions, and on some systems these can
|
||||
be slow to load (i.e. a second or so). Projects that do not require these
|
||||
extension functions should not have to pay for this unnecessary overhead. Now,
|
||||
only core functions will be loaded by default, and extensions can be loaded
|
||||
explicitly in projects that require such functionality.
|
||||
|
||||
|
||||
Change
|
||||
------
|
||||
Thread::setPriority() will no longer set a realtime scheduling policy for all
|
||||
|
|
|
|||
|
|
@ -3784,7 +3784,9 @@
|
|||
JUCE_GL_FUNCTIONS_GL_VERSION_4_3_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_VERSION_4_4_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_VERSION_4_5_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_VERSION_4_6_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_VERSION_4_6_DYNAMIC
|
||||
|
||||
#define JUCE_EXTENSION_GL_FUNCTIONS \
|
||||
JUCE_GL_FUNCTIONS_GL_3DFX_tbuffer \
|
||||
JUCE_GL_FUNCTIONS_GL_AMD_debug_output \
|
||||
JUCE_GL_FUNCTIONS_GL_AMD_draw_buffers_blend \
|
||||
|
|
@ -4049,6 +4051,7 @@ JUCE_STATIC_GL_FUNCTIONS
|
|||
static returns (KHRONOS_APIENTRY* juce_ ## name) params = nullptr; \
|
||||
returns (KHRONOS_APIENTRY* const& ::juce::gl::name) params = juce_ ## name;
|
||||
JUCE_DYNAMIC_GL_FUNCTIONS
|
||||
JUCE_EXTENSION_GL_FUNCTIONS
|
||||
#undef X
|
||||
|
||||
void juce::gl::loadFunctions()
|
||||
|
|
@ -4059,5 +4062,14 @@ void juce::gl::loadFunctions()
|
|||
#undef X
|
||||
}
|
||||
|
||||
void juce::gl::loadExtensions()
|
||||
{
|
||||
#define X(returns, name, params) \
|
||||
juce_ ## name = reinterpret_cast<returns (KHRONOS_APIENTRY*) params> (::juce::OpenGLHelpers::getExtensionFunction (#name));
|
||||
JUCE_EXTENSION_GL_FUNCTIONS
|
||||
#undef X
|
||||
}
|
||||
|
||||
#undef JUCE_STATIC_GL_FUNCTIONS
|
||||
#undef JUCE_DYNAMIC_GL_FUNCTIONS
|
||||
#undef JUCE_EXTENSION_GL_FUNCTIONS
|
||||
|
|
|
|||
|
|
@ -11990,7 +11990,19 @@ enum : GLenum
|
|||
#endif
|
||||
|
||||
|
||||
/** Load all available functions from the OpenGL core API.
|
||||
|
||||
This will not load extensions!
|
||||
*/
|
||||
void loadFunctions();
|
||||
|
||||
/** Load all available OpenGL extension functions.
|
||||
|
||||
It's probably a good idea to stick to the core API as much as possible.
|
||||
Extensions are not as portable, and it can be a little time-consuming to
|
||||
load all of the extension entry-points.
|
||||
*/
|
||||
void loadExtensions();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1253,7 +1253,9 @@
|
|||
JUCE_GL_FUNCTIONS_GL_ES_VERSION_2_0_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_ES_VERSION_3_0_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_ES_VERSION_3_1_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_ES_VERSION_3_2_DYNAMIC \
|
||||
JUCE_GL_FUNCTIONS_GL_ES_VERSION_3_2_DYNAMIC
|
||||
|
||||
#define JUCE_EXTENSION_GL_FUNCTIONS \
|
||||
JUCE_GL_FUNCTIONS_GL_AMD_framebuffer_multisample_advanced \
|
||||
JUCE_GL_FUNCTIONS_GL_AMD_performance_monitor \
|
||||
JUCE_GL_FUNCTIONS_GL_ANGLE_framebuffer_blit \
|
||||
|
|
@ -1392,6 +1394,7 @@ JUCE_STATIC_GL_FUNCTIONS
|
|||
static returns (KHRONOS_APIENTRY* juce_ ## name) params = nullptr; \
|
||||
returns (KHRONOS_APIENTRY* const& ::juce::gl::name) params = juce_ ## name;
|
||||
JUCE_DYNAMIC_GL_FUNCTIONS
|
||||
JUCE_EXTENSION_GL_FUNCTIONS
|
||||
#undef X
|
||||
|
||||
void juce::gl::loadFunctions()
|
||||
|
|
@ -1402,5 +1405,14 @@ void juce::gl::loadFunctions()
|
|||
#undef X
|
||||
}
|
||||
|
||||
void juce::gl::loadExtensions()
|
||||
{
|
||||
#define X(returns, name, params) \
|
||||
juce_ ## name = reinterpret_cast<returns (KHRONOS_APIENTRY*) params> (::juce::OpenGLHelpers::getExtensionFunction (#name));
|
||||
JUCE_EXTENSION_GL_FUNCTIONS
|
||||
#undef X
|
||||
}
|
||||
|
||||
#undef JUCE_STATIC_GL_FUNCTIONS
|
||||
#undef JUCE_DYNAMIC_GL_FUNCTIONS
|
||||
#undef JUCE_EXTENSION_GL_FUNCTIONS
|
||||
|
|
|
|||
|
|
@ -5252,7 +5252,19 @@ enum : GLenum
|
|||
#endif
|
||||
|
||||
|
||||
/** Load all available functions from the OpenGL core API.
|
||||
|
||||
This will not load extensions!
|
||||
*/
|
||||
void loadFunctions();
|
||||
|
||||
/** Load all available OpenGL extension functions.
|
||||
|
||||
It's probably a good idea to stick to the core API as much as possible.
|
||||
Extensions are not as portable, and it can be a little time-consuming to
|
||||
load all of the extension entry-points.
|
||||
*/
|
||||
void loadExtensions();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue