OpenGL: make platform requirements explicit
At context startup, make sure our assumptions about the OpenGL version are true. Should match since we set up the contexts... but this is what asserts are for, to check "should"s! Part of T49012
This commit is contained in:
parent
42ed1f0e3c
commit
82648a8f91
|
@ -128,10 +128,21 @@ void GPU_get_dfdy_factors(float fac[2])
|
|||
|
||||
void gpu_extensions_init(void)
|
||||
{
|
||||
BLI_assert(GLEW_VERSION_3_0 || /* Mesa mininum requirement */
|
||||
(GLEW_VERSION_2_1 && GLEW_EXT_gpu_shader4 /* Mac minimum requirement */
|
||||
&& GLEW_ARB_framebuffer_object
|
||||
&& GLEW_APPLE_flush_buffer_range));
|
||||
/* during 2.8 development each platform has its own OpenGL minimum requirements
|
||||
* final 2.8 release will be unified on OpenGL 3.2 core profile, no required extensions
|
||||
* see developer.blender.org/T49012 for details
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
BLI_assert(GLEW_VERSION_3_2);
|
||||
#elif defined(__APPLE__)
|
||||
BLI_assert(GLEW_VERSION_2_1 && GLEW_EXT_gpu_shader4
|
||||
&& GLEW_ARB_framebuffer_object
|
||||
&& GLEW_ARB_draw_elements_base_vertex
|
||||
&& GLEW_APPLE_flush_buffer_range);
|
||||
#else
|
||||
BLI_assert(GLEW_VERSION_3_2 || (GLEW_VERSION_3_0 && ARB_draw_elements_base_vertex));
|
||||
/* vendor driver || Mesa compatibility profile */
|
||||
#endif
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &GG.maxtextures);
|
||||
|
||||
|
|
Loading…
Reference in New Issue