PDA

View Full Version : Getting the dimensions of a texture



schobbejak
03-29-2012, 01:53 AM
I am making a function which takes a texture and outputs it's contents as a float array (for debugging only. I know its slow).
For this I need to get the width and height of the texture. (to create a float array which has the same size as the texture).
OpenGl uses this:
http://www.opengl.org/sdk/docs/man/xhtml/glGetTexLevelParameter.xml,
but that does not seem to work in webgl.

How do I retrieve information about a texture?