mirror of https://github.com/kivy/kivy.git
glew: add more information about the GLEW initialization. refs #610
This commit is contained in:
parent
09c917ab78
commit
c949a5984c
|
@ -75,6 +75,7 @@ void glew_dynamic_binding() {
|
|||
*/
|
||||
if (glGenFramebuffers == NULL) {
|
||||
printf("GL: glGenFramebuffers is NULL, try to detect an extension\n");
|
||||
printf("GL: available extensions: %s\n", gl_extensions);
|
||||
if (strstr(gl_extensions, "ARB_framebuffer_object")) {
|
||||
printf("GL: ARB_framebuffer_object is supported\n");
|
||||
|
||||
|
|
|
@ -1570,9 +1570,18 @@ def glViewport(GLint x, GLint y, GLsizei width, GLsizei height):
|
|||
IF USE_GLEW:
|
||||
cdef extern from "gl_redirect.h":
|
||||
int glewInit()
|
||||
int GLEW_OK
|
||||
char *glewGetErrorString(int)
|
||||
void glew_dynamic_binding()
|
||||
def gl_init_symbols():
|
||||
glewInit()
|
||||
cdef int result
|
||||
cdef bytes error
|
||||
result = glewInit()
|
||||
if result != GLEW_OK:
|
||||
error = glewGetErrorString(result)
|
||||
print 'GLEW initialization error:', error
|
||||
else:
|
||||
print 'GLEW initialization succeeded'
|
||||
glew_dynamic_binding()
|
||||
|
||||
ELSE:
|
||||
|
|
Loading…
Reference in New Issue