pyrender icon indicating copy to clipboard operation
pyrender copied to clipboard

How to use the GL_ constants in pyrender's function arguments?

Open patrikhuber opened this issue 5 years ago • 0 comments

Hi,

Some classes/functions like Texture (https://pyrender.readthedocs.io/en/latest/generated/pyrender.Texture.html) take as input GL_TEXTURE_2D and GL_FLOAT. If I'm fine with the default, it all works, but how do I change this to e.g. GL_UNSIGNED_BYTE? These constans are not defined as far as I can see, I can't find them in the documentation's search and playing around trying to find them, e.g. pyrender.GL_UNSIGNED_BYTE, I can't find which (sub-)module/namespace they're defined in.

Also (maybe should open a separate issue for this?), above Texture documentation has data_format=GL_FLOAT as default while the code's help(pyrender.Texture) shows data_format=GL_UNSIGNED_BYTE as default. More confusingly, the documentation says data_format (int) – For now, just GL_FLOAT.. Would be great to clean that up / clarify that?

Thanks a lot for this great library :)

patrikhuber avatar Jul 07 '20 15:07 patrikhuber