View Full Version : glTexSubImage3DExt Problem

05-29-2005, 11:49 PM

I am implementing an eraser tool on a 512*512*512 bytes 3d texture

Here is my code:

eraser_texture : ^byte;

Zeromemory(eraser_texture, 50*50*50);

glTexSubImage3DExt (GL_TEXTURE_3D, 0, 200, 200, 0,50, 50, 50, GL_Luminance, GL_UNSIGNED_BYTE, eraser_texture);

Unfortunately, the glTexSubImage3DExt function gives an access violation. Although this is not a solution, when I doubled the size of the eraser_texture pointer, the function worked fine. What am I missing?? :confused:

05-30-2005, 02:45 AM
This is an extension, so you'll need to load it with wglGetProcAddressARB. I don't know if you can simply use glTexSubImage3D instead. Also, depending on the version this extension had been released and the version of your gl, you can access it, using the define GL_GLEXT_PROTOTYPES.

Hope that helps.