「利用者:Jwilkins/VFX/GLEW」の版間の差分
(Created page with "= GLEW = Header File: <tt>GPU_glew.h</tt> This file should be included instead of <tt>GL/glew.h</tt> because it patches the differences between the official ''GLEW'' and the ex...") |
細 (1版 をインポートしました) |
(相違点なし)
|
2018年6月29日 (金) 06:04時点における最新版
目次
GLEW
Header File: GPU_glew.h
This file should be included instead of GL/glew.h because it patches the differences between the official GLEW and the experimental GLEW required to work with OpenGL ES.
Additionally, the definitions required to work with the GLEW context system (GLEW_MX) are defined in this file.
Also, this file will mangle deprecated API names that should not normally be used by Blender.
Build Options
Blender is always built with the GLEW options GLEW_STATIC and GLEW_MX. GLEW_STATIC means that GLEW is linked statically instead of as a dynamic library and GLEW_MX means that GLEW supports the possibility that different OpenGL contexts might export different function pointers.
WITH_GLEW_ES
Currently GLEW does not support OpenGL ES, but Blender includes a alternative experimental version of GLEW which does support OpenGL ES. The official version of GLEW is in extern/glew while the experimental version is in extern/glew-es. Enabling WITH_GLEW_ES switches Blender to use the experimental version.
The following options will not work unless WITH_GLEW_ES is also activated (except for WITH_GL_PROFILE_COMPAT and WITH_GL_SYSTEM_EMBEDDED, which represents Legacy OpenGL).
Although it is possible that Blender could support multiple profiles in the same executable, at this time select only one of the following.
WITH_GL_PROFILE_COMPAT
WITH_GL_PROFILE_ES20
WITH_GL_PROFILE_CORE
Although it is possible that Blender could support multiple systems in the same executable, at this time select only one of the following.
WITH_GL_SYSTEM_DESKTOP
WITH_GL_SYSTEM_EMBEDDED
Linking ES
WITH_SYSTEM_GLES
Turn on WITH_SYSTEM_GLEW to try and automatically find the system's OpenGL ES library files. This will set the following variables. Without this option these variables will have to be set manually.
OPENGLES_LIBRARY
File path to GLESv2 library.
OPENGLES_DLL
File path to GLESv2 DLL.
OPENGLES_EGL_LIBRARY
File path to EGL library.
OPENGLES_EGL_DLL
File path to EGL DLL.
ANGLE
WITH_ANGLE
Enable WITH_ANGLE to build on Windows using the ANGLE (Almost Native Graphics Layer Engine) which implements OpenGL ES on top of Direct3D.
Set OPENGLES_LIBRARY and OPENGLES_EGL_LIBRARY to the ANGLE library files and OPENGLES_DLL and OPENGLES_EGL_DLL to the ANGLE DLL files.
D3DCOMPILER_DLL
In addition to the library and DLL files the Direct3D HLSL compiler is also needed by ANGLE in order to work. Set the D3DCOMPILER_DLL to a copy of the compiler required by the version of ANGLE being linked so that it can be found by Blender
ARM Mali ES Emulator
The Mali OpenGL ES emulator by ARM is set up in the same way as ANGLE except that Mali is implemented on top of desktop OpenGL so it does not need the Direct3D shader compiler.
Deprecated Function Name Mangling
Header File: GPU_deprecated.h
If you include GPU_glew_h you also get GPU_deprecated.h which will mangle the names and symbols that should not be used by Blender so that a compile error will result.
For example, the glBegin will be mangled into DO_NOT_USE_glBegin, which should trigger an "undefined symbol" error during compilation.
In some situations this name mangling is not desired, so to turn it off, define GPU_MANGLE_DEPRECATED to be 0 before including GPU_glew.h. This should only be done for low level internal libraries such as BGL or the GPU module itself.
This name mangling is intended to help prevent programmers from accidentally using legacy OpenGL.