Jump to content
  • Advertisement
Sign in to follow this  

Cubemap error

This topic is 3165 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!