Sign in to follow this  
I CAN DO

Cubemap error

Recommended Posts

Hello friends, I have the following problem to solve. My scene consists of a 3D object that has a dynamic cubemap. When I work with glBegin() glEnd() everything works fine but when I work with VBO, the Cubemap not draw. glUseProgram (ProgramShader [j]); glEnableClientState (GL_VERTEX_ARRAY); glEnableClientState (GL_NORMAL_ARRAY); glEnableClientState (GL_TEXTURE_COORD_ARRAY); glClientActiveTextureARB (GL_TEXTURE0_ARB); glBindBufferARB (GL_ARRAY_BUFFER_ARB, BufferTextur [j]); glTexCoordPointer (2 GL_FLOAT, 0, 0); glEnableClientState (GL_TEXTURE_COORD_ARRAY); glActiveTextureARB (GL_TEXTURE0_ARB); glBindTexture (GL_TEXTURE_CUBE_MAP_ARB, DynTexture); glEnable (GL_TEXTURE_CUBE_MAP_ARB); glClientActiveTextureARB (GL_TEXTURE1_ARB); glBindBufferARB (GL_ARRAY_BUFFER_ARB, BufferTextur [j]); glEnableClientState (GL_TEXTURE_COORD_ARRAY); glTexCoordPointer (2 GL_FLOAT, 0, 0); glActiveTextureARB (GL_TEXTURE1_ARB); glEnable (GL_TEXTURE_2D); glBindTexture (GL_TEXTURE_2D, NumeroDeTextura[M[j]->faces [0]. material].texID); glEnable (GL_TEXTURE_2D); glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferVertex[j]); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, BufferIndexs[j]); glVertexPointer(3, GL_FLOAT, 0, 0); glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferNormal[j]); glNormalPointer(GL_FLOAT, 0, 0); glDrawElements(GL_TRIANGLES,3*M[j]->nfaces,GL_UNSIGNED_SHORT,0); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glClientActiveTextureARB (GL_TEXTURE1_ARB); glDisableClientState (GL_TEXTURE_COORD_ARRAY); glClientActiveTextureARB (GL_TEXTURE0_ARB); glDisableClientState (GL_TEXTURE_COORD_ARRAY); glActiveTextureARB (GL_TEXTURE0_ARB); glDisable (GL_TEXTURE_CUBE_MAP_ARB); glDisable (GL_TEXTURE_2D); glActiveTextureARB (GL_TEXTURE1_ARB); glDisable (GL_TEXTURE_2D); glUseProgram (0); What could be wrong?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this