OpenGL 3.2 core profile
Gregor Thalhammer <[email protected]> Sun, 8 Jan 2012 21:59:58 +0100
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
first thanks to Mike Fletcher for creating this wonderful package!
I want to make use of the new OpenGL 3.2 core profile implementation on OS X 10.7 Lion. Now I experience some problems with PyOpenGL 3.0.2a, e.g. when I want to use glGenVertexArrays.
I could track some of the problems to the function 'hasGLExtension' in OpenGL/extensions.py, here the problematic lines:
try:
AVAILABLE_GL_EXTENSIONS[:] = glGetString( GL_EXTENSIONS ).split()
except error.GLError, err:
# OpenGL 3.0 deprecates glGetString( GL_EXTENSIONS )
from OpenGL.GL import GL_NUM_EXTENSIONS, glGetStringi, glGetIntegerv
count = glGetIntegerv( GL_NUM_EXTENSIONS )
for i in range( count ):
AVAILABLE_GL_EXTENSIONS.append(
glGetStringi( GL_EXTENSIONS, i )
)
result = specifier in AVAILABLE_GL_EXTENSIONS
1) glGetString(GL_EXTENSIONS) returns NULL, split() then throws an AttributeError.
I observed (with GL Profiler) that there is no error check (call of GetError after GetString), therefore the next GL function call fails with a false error.
2) later, GetStringi( GL_EXTENSIONS, i) produces an OpenGL.arrays.arraydatatype.GLubyteArray instead of a bytes string, which gives always a False result in the last line.
To fix this I duplicated in OpenGL/glget.py the code for glGetString accordingly for glGetStringi, and changed the import statement above to use this definition.
3) For glGenVertexArrays PyOpenGL expects that the extension GL_ARB_vertex_array_object is available. However, this extension is not present since glGenVertexArrays is part of OpenGL 3.0 (and 3.2 core profile). Here I am stuck, I don't know how to fix this (and for other related GL functions)
Please, I need help to proceed with these problems.
Gregor
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-devel