PDA

View Full Version : glTexSubImage3DExt Problem



Tomy
05-30-2005, 12:49 AM
Hi,

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

Here is my code:

eraser_texture : ^byte;

Getmem(eraser_texture,50*50*50);
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:

jide
05-30-2005, 03: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.