Add stubs to build WITH_GL_PROFILE_CORE

This is an auto-generated list, crossing gl-deprecated.h, glew.h and the
Blender code. It allows Blender to build with core profile.

WITH_OPENGL_LEGACY=ON: nothing changes

WITH_OPENGL_LEGACY=OFF and WITH_GL_PROFILE_CORE=OFF:
It stubs deprecated legacy calls.

WITH_OPENGL_LEGACY=OFF and WITH_GL_PROFILE_CORE=ON:
It stubs deprecated legacy calls thus allowing Blender to build with
core profile only.

Technically you only want to use WITH_OPENGL_LEGACY=OFF when
WITH_GL_PROFILE_CORE=ON. But it doesn't hurt to have it working for both
scenarios.

Reviewed by: merwin

Differential Revision: https://developer.blender.org/D2610
This commit is contained in:
Dalai Felinto
2017-04-10 08:30:09 +02:00
parent 15bcfaa36b
commit 91056337a8
2 changed files with 346 additions and 160 deletions

View File

@@ -85,7 +85,7 @@ extern MXContext *_mx_context;
/* If compiling only for OpenGL 3.2 Core Profile then we should make sure
* no legacy API entries or symbolic constants are used.
*/
#if defined(WITH_GL_PROFILE_CORE) && !defined(WITH_GL_PROFILE_COMPAT) && !defined(WITH_GL_PROFILE_ES20)
#if (!defined(WITH_LEGACY_OPENGL)) || defined(WITH_GL_PROFILE_CORE) && !defined(WITH_GL_PROFILE_COMPAT) && !defined(WITH_GL_PROFILE_ES20)
# include "intern/gl-deprecated.h"
#endif