[Bf-blender-cvs] [4db67aab06d] blender2.8: Fix OpenGL extension report in system info operator.

Antony Riakiotakis noreply at git.blender.org
Mon Oct 23 21:22:30 CEST 2017


Commit: 4db67aab06dfe6a210ab20268ed898834371119b
Author: Antony Riakiotakis
Date:   Mon Oct 23 22:22:22 2017 +0300
Branches: blender2.8
https://developer.blender.org/rB4db67aab06dfe6a210ab20268ed898834371119b

Fix OpenGL extension report in system info operator.

===================================================================

M	release/scripts/modules/sys_info.py
M	source/blender/python/generic/bgl.c

===================================================================

diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py
index e447d8a4dc5..53b3197fca3 100644
--- a/release/scripts/modules/sys_info.py
+++ b/release/scripts/modules/sys_info.py
@@ -185,14 +185,19 @@ def write_sysinfo(filepath):
                 output.write("version:\t%r\n" % (bgl.glGetString(bgl.GL_VERSION)))
                 output.write("extensions:\n")
 
-                glext = sorted(bgl.glGetString(bgl.GL_EXTENSIONS).split())
+                limit = bgl.Buffer(bgl.GL_INT, 1)
+                bgl.glGetIntegerv(bgl.GL_NUM_EXTENSIONS, limit)
+
+                glext = []
+                for i in range(limit[0]):
+                    glext.append(bgl.glGetStringi(bgl.GL_EXTENSIONS, i))
+
+                glext = sorted(glext)
+
                 for l in glext:
                     output.write("\t%s\n" % l)
 
                 output.write(title("Implementation Dependent OpenGL Limits"))
-                limit = bgl.Buffer(bgl.GL_INT, 1)
-                bgl.glGetIntegerv(bgl.GL_MAX_TEXTURE_UNITS, limit)
-                output.write("Maximum Fixed Function Texture Units:\t%d\n" % limit[0])
                 bgl.glGetIntegerv(bgl.GL_MAX_ELEMENTS_VERTICES, limit)
                 output.write("Maximum DrawElements Vertices:\t%d\n" % limit[0])
                 bgl.glGetIntegerv(bgl.GL_MAX_ELEMENTS_INDICES, limit)
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 9672b824843..827b69f5403 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -1298,6 +1298,7 @@ BGL_Wrap(UniformMatrix4x3fv,        void,      (GLint, GLsizei, GLboolean, GLflo
 BGL_Wrap(BindVertexArray,           void,      (GLuint))
 BGL_Wrap(DeleteVertexArrays,        void,      (GLsizei, GLuintP))
 BGL_Wrap(GenVertexArrays,           void,      (GLsizei, GLuintP))
+BGL_Wrap(GetStringi,                GLstring,  (GLenum, GLuint))
 BGL_Wrap(IsVertexArray,             GLboolean, (GLuint))
 
 
@@ -1628,6 +1629,7 @@ PyObject *BPyInit_bgl(void)
 		PY_MOD_ADD_METHOD(BindVertexArray);
 		PY_MOD_ADD_METHOD(DeleteVertexArrays);
 		PY_MOD_ADD_METHOD(GenVertexArrays);
+		PY_MOD_ADD_METHOD(GetStringi);
 		PY_MOD_ADD_METHOD(IsVertexArray);
 	}



More information about the Bf-blender-cvs mailing list