PDA

View Full Version : Multitexturing with samplerCube



Varela
08-26-2005, 01:18 AM
Hello,

How do I send a cube texture to the fragment shader?
I'm doing the following but it's not working:

glUniform1iARB(_envMapLoc, 0); // Tex unit 0

// Create Cube Map texture (GLuint = 0)
CubeMap *cubeMap = new CubeMap(Image("Models//SkyFront.tga"),
Image("Models//SkyBack.tga"),
Image("Models//SkyLeft.tga"),
Image("Models//SkyRight.tga"),
Image("Models//SkyTop.tga"),
Image("Models//SkyTop.tga"));

// Send texture (GLuint=0) to shader to tex unit 0
glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);

Am I missing something?
Thanks.

Varela
08-26-2005, 03:20 AM
Sorry!!! Problem solved.
Thanks.