Advertisement Jump to content

Archived

This topic is now archived and is closed to further replies.

OleKaiwalker

Multitexturing

This topic is 5706 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

Hey, What''s wrong with this? It''s only showing texture0_arb... Code -> GLfloat bVertices[] = { x - bWidth, y - bHeight, z - bLength, x + bWidth, y - bHeight, z - bLength, x + bWidth, y + bHeight, z - bLength, x - bWidth, y + bHeight, z - bLength, x - bWidth, y - bHeight, z + bLength, x - bWidth, y + bHeight, z + bLength, x + bWidth, y + bHeight, z + bLength, x + bWidth, y - bHeight, z + bLength, x - bWidth, y - bHeight, z + bLength, x + bWidth, y - bHeight, z + bLength, x + bWidth, y - bHeight, z - bLength, x - bWidth, y - bHeight, z - bLength, x - bWidth, y + bHeight, z + bLength, x - bWidth, y + bHeight, z - bLength, x + bWidth, y + bHeight, z - bLength, x + bWidth, y + bHeight, z + bLength, x - bWidth, y - bHeight, z - bLength, x - bWidth, y + bHeight, z - bLength, x - bWidth, y + bHeight, z + bLength, x - bWidth, y - bHeight, z + bLength, x + bWidth, y - bHeight, z - bLength, x + bWidth, y - bHeight, z + bLength, x + bWidth, y + bHeight, z + bLength, x + bWidth, y + bHeight, z - bLength }; GLfloat bTexCoords[] = {0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f }; glEnable(GL_TEXTURE_2D); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, bVertices); glClientActiveTextureARB(GL_TEXTURE0_ARB); glTexCoordPointer(2, GL_FLOAT, 0, bTexCoords); glClientActiveTextureARB(GL_TEXTURE0_ARB); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glActiveTextureARB(GL_TEXTURE0_ARB); glBindTexture(GL_TEXTURE_2D, skyBoxTextures[0]); glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glClientActiveTextureARB(GL_TEXTURE1_ARB); glTexCoordPointer(2, GL_FLOAT, 0, bTexCoords); glClientActiveTextureARB(GL_TEXTURE1_ARB); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glActiveTextureARB(GL_TEXTURE1_ARB); glBindTexture(GL_TEXTURE_2D, skyBoxMTextures[0]); glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glDrawArrays(GL_QUADS, 0, 24); glActiveTextureARB(GL_TEXTURE0_ARB); glDisable(GL_TEXTURE_2D); glActiveTextureARB(GL_TEXTURE1_ARB); glDisable(GL_TEXTURE_2D); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); }

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!