From 79e862ad6b416968f3e0afa7a18f98ab11a4db03 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Sat, 8 Apr 2017 02:34:30 -0400 Subject: GPU lib support for WITH_LEGACY_OPENGL For early testing of core profile: - GPU_legacy_support = false - GPU_display_list_support = false - GPU_geometry_shader_support = true Relates to T49012 --- source/blender/gpu/intern/gpu_extensions.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source/blender/gpu/intern/gpu_extensions.c') diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 175fb9de041..350abe94903 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -273,6 +273,7 @@ void gpu_extensions_exit(void) bool GPU_legacy_support(void) { +#ifdef WITH_LEGACY_OPENGL /* return whether or not current GL context is compatible with legacy OpenGL */ /* (will be removed after switching to core profile) */ @@ -308,6 +309,9 @@ bool GPU_legacy_support(void) } return support; +#else + return false; +#endif } bool GPU_full_non_power_of_two_support(void) @@ -319,11 +323,15 @@ bool GPU_full_non_power_of_two_support(void) bool GPU_display_list_support(void) { +#ifdef WITH_LEGACY_OPENGL /* deprecated in GL 3 * supported on older GL and compatibility profile * still queried by game engine */ return true; +#else + return false; +#endif } bool GPU_bicubic_bump_support(void) @@ -333,10 +341,13 @@ bool GPU_bicubic_bump_support(void) bool GPU_geometry_shader_support(void) { - /* starting with GL 3.2 geometry shaders are fully supported - * core profile clashes with our other shaders so accept compatibility only - */ + /* starting with GL 3.2 geometry shaders are fully supported */ +#ifdef WITH_LEGACY_OPENGL + /* core profile clashes with our other shaders so accept compatibility only */ return GLEW_VERSION_3_2 && GPU_legacy_support(); +#else + return GLEW_VERSION_3_2; +#endif } bool GPU_instanced_drawing_support(void) -- cgit v1.2.3