Psychtoolbox>Screen.{mex*} subfunction

[ gltexid gltextarget texcoord_u texcoord_v ] =Screen(‘GetOpenGLTexture’, windowPtr, textureHandle [, x][, y]);

Returns information about the OpenGL texture corresponding to a Psychtoolbox
texture. “windowPtr” is the handle of the onscreen window for which texture
should be returned. ‘textureHandle’ is the Psychtoolbox handle for the requested
texture. Optionally you can pass in Psychtoolbox texture coordinates (x,y) and
get them mapped to the proper OpenGL texture coordinates. Return values:
‘gltexid’ OpenGL texture id for binding the texture. ‘gltextarget’ type of
OpenGL texture target to use. ‘texcoord_u’ and ‘texcoord_v’ OpenGL texture
coordinates corresponding to ‘x’ and ‘y’. Immediately after calling this
routine, the proper OpenGL rendering context for the requested texture is
activated for use. Example of usage: glBindTexture(gltextarget, gltexid); //
Activate and bind req. texture. glTexCoord2d(texcoord_u, texcoord_v); // Assign
texture pixel (x,y) to next vertex. For more info, read an OpenGL book.

###See also: SetOpenGLTexture