I've noticed that under Python3, PyOpenGL inconsistently expects 'str' and 'bytes' objects as function arguments. For some functions, I'd expect to use 'str' while in the current implementation 'bytes' is used.

E.g. in glGetUniformlocation, the name of the uniform is to be specified as a 'bytes' object, while I would expect to use 'str' since it is a name. Also, shaders.compileShader takes a 'str' for the shader code

Similarly, extensions.hasGLExtension() expects a 'str' object for the extension name, but extension.AVAILABLE_GL_EXTENSIONS is a list of 'bytes'.

Of course, for arguments dealing with binary data (e.g. glTexImage2D), a 'bytes' object is to be used.

Apart from the actual implementation, has there been any thought on how to expose things like uniform names to the user? 


ps. as a side note: I think for most cases the actual encoding to be used is not really an issue since shader code, uniform names etc are restricted to asci anyway.

Rob Reilink, M.Sc
Science Applied

phone: +31 6 187 26562
e-mail: r.reilink@science-applied.nl