PDA

View Full Version : intel map texture extension



qnext
12-18-2012, 02:26 PM
Is there any sample to explain how to use the new opengl intel extension ?: http://www.opengl.org/registry/specs/INTEL/map_texture.txt

thokra
12-19-2012, 01:04 AM
It's like mapping buffer data, only in case of textures you have to select a mip-map level and can provide pointers to retrieve the stride and layout of the mapped texture.

You need to first bind a texture object to GL_TEXTURED_2D and, as far as I read it, set the layout using glTexParameteri(). Then call MapTexture2DINTEL with appropriate parameters and check if a non-null pointer is returned. If so, read/write contents of your mapped textures. Done.

I find the extension quite simple. However, the written English is absolutely horrible. This text will never make it into core.