diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-01 02:10:30 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-01 02:10:30 +0300 |
commit | 82648a8f919cf42355c3be3d1feabab0c5889508 (patch) | |
tree | 634f03cd67ad622285b9f9f863a80106a01b049e /source/blender/gpu/intern/gpu_extensions.c | |
parent | 42ed1f0e3cbd9d477b7a535b52030c7905ca5362 (diff) |
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
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 26c863d9ed4..1e283b5f56d 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -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); |