diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-08 09:34:30 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-08 09:34:30 +0300 |
commit | 79e862ad6b416968f3e0afa7a18f98ab11a4db03 (patch) | |
tree | 1c7c354b4ae69a9743dc97b4f3fb5cb05a2dc089 /source/blender/gpu/intern/gpu_extensions.c | |
parent | f60626e3a633ce8506cbc12310b42b60ade5f95e (diff) |
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
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 17 |
1 files changed, 14 insertions, 3 deletions
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) |