glTexImage2D Trick
Posted: Sun Oct 17, 2010 8:13 pm
Say you're creating a texture object but you don't have the data for it yet. You might think that you need to allocate a dummy buffer of the right size, but you actually don't. Just give glTexImage2D a NULL pointer and it will happily create the texture for you.
It's all there in the documentation (http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml).
It's all there in the documentation (http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml).