glTexImage1/2/3D does not allow NULL texture data
Brought to you by:
mcfletch
The glTexImage1/2/3D calls do not allow NULL texture
data to be passed in. For example, the following
valid OpenGL call fails with a TypeError:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, 512, 512, 0,
GL_RGB, GL_INT, None)
File "gl.pyx", line 592, in gl.glTexImage2D
TypeError: expected string or Unicode object,
NoneType found
A NULL texture is useful when you want to create a
render target texture or a texture whose content will
be defined at a later time.
Regards,
Sami Kyöstilä <skyostilDROP@THIS.kempele.fi>
Logged In: YES
user_id=34901
Originator: NO
This is now working in 3.x CVS.
Logged In: YES
user_id=2042
Originator: NO
What about allowing the use of 0?
Often in example opengl code 0 is used, and not NULL. Passing in 0 currently fails - where I think it should act as C opengl does. This would allow more copy/paste examples to work from C code.
cu,