Menu

#144 glTexImage1/2/3D does not allow NULL texture data

v2.0.1
open-fixed
GL (74)
5
2008-01-23
2006-05-31
Anonymous
No

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>

Discussion

  • Mike C. Fletcher

    Logged In: YES
    user_id=34901
    Originator: NO

    This is now working in 3.x CVS.

     
  • Mike C. Fletcher

    • assigned_to: nobody --> mcfletch
    • status: open --> closed-fixed
     
  • Rene Dudfield

    Rene Dudfield - 2008-01-23
    • status: closed-fixed --> open-fixed
     
  • Rene Dudfield

    Rene Dudfield - 2008-01-23

    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,

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.