Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
index 58cd8dc2aa1..9e06fcda299 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
@@ -406,7 +406,7 @@ PFNGLGETACTIVEATTRIBARBPROC blGetActiveAttribARB;
PFNGLGETATTRIBLOCATIONARBPROC blGetAttribLocationARB;
#endif
-
+#if 0 // TODO: GL_ARB_vertex/fragment_program support
#ifdef GL_ARB_vertex_program
PFNGLVERTEXATTRIB1FARBPROC blVertexAttrib1fARB;
PFNGLVERTEXATTRIB1FVARBPROC blVertexAttrib1fvARB;
@@ -421,6 +421,13 @@ PFNGLGETATTRIBLOCATIONARBPROC blGetAttribLocationARB;
PFNGLGETVERTEXATTRIBFVARBPROC blGetVertexAttribfvARB;
PFNGLGETVERTEXATTRIBIVARBPROC blGetVertexAttribivARB;
#endif
+#endif
+
+#ifdef GL_EXT_compiled_vertex_array
+ PFNGLLOCKARRAYSEXTPROC blLockArraysEXT;
+ PFNGLUNLOCKARRAYSEXTPROC blUnlockArraysEXT;
+#endif
+
} // namespace bgl
@@ -605,6 +612,7 @@ static void LinkExtensions()
}
#endif
+#if 0 // TODO: GL_ARB_vertex/fragment_program support
#if defined(GL_ARB_vertex_program)
if (QueryExtension("GL_ARB_vertex_program"))
{
@@ -629,6 +637,7 @@ static void LinkExtensions()
}
}
#endif
+#endif
#ifdef GL_ARB_depth_texture
@@ -643,6 +652,22 @@ static void LinkExtensions()
}
#endif
+#ifdef GL_EXT_compiled_vertex_array
+ if (QueryExtension("GL_EXT_compiled_vertex_array"))
+ {
+ blLockArraysEXT = reinterpret_cast<PFNGLLOCKARRAYSEXTPROC>(bglGetProcAddress((const GLubyte *) "glLockArraysEXT"));
+ blUnlockArraysEXT = reinterpret_cast<PFNGLUNLOCKARRAYSEXTPROC>(bglGetProcAddress((const GLubyte *) "glUnlockArraysEXT"));
+ if (blLockArraysEXT && blUnlockArraysEXT) {
+ EnableExtension(_GL_EXT_compiled_vertex_array);
+ RAS_EXT_support._EXT_compiled_vertex_array = 1;
+ if (doDebugMessages)
+ std::cout << "Enabled GL_EXT_compiled_vertex_array" << std::endl;
+ } else {
+ std::cout << "ERROR: GL_EXT_compiled_vertex_array implementation is broken!" << std::endl;
+ }
+ }
+#endif
+
if (QueryExtension("GL_EXT_separate_specular_color"))
{
EnableExtension(_GL_EXT_separate_specular_color);