PDA

View Full Version : coordinate of 3d texture



hwj_just
04-12-2005, 06:08 PM
hi
i want to know what is the differce between 2d and 3d texture coordinate? how can i make 3d texture coordinate? could give me some example?

thank you very much!

dorbie
04-13-2005, 03:49 PM
glTexCoord2f(s, t);
glTexCoord3f(s, t, r);

The second example interpolates a 3rd coordinate that will be used to address the third texture axis if you have a 3D texture volume instead of a 2D texture image.

Read up on the following calls:

glEnable(GL_TEXTURE_3D);
glTexImage3D()