Jump to content
  • Advertisement

Archived

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

Basiror

multitexturing and tex coordinate pointer?

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

Advertisement
glClientActiveTexture.( GL_TEXTURE0 );
glTexCoordPointer..
glClientActiveTexture.( GL_TEXTURE1 );
glTexCoordPointer

etc

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
yep, it works
im using it in my "yet another quake3 loader"

heres some code from the engine to get u started:

  
glClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT,Size, &GetBuffer()->m_RenderData[0].TextureCoords);

glClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(2, GL_FLOAT,Size, &GetBuffer()->m_RenderData[0].LightMapCoords);

glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glClientActiveTextureARB(GL_TEXTURE1_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

Share this post


Link to post
Share on other sites
quote:
Original post by Basiror
and that works?

cause there is an extra function for specifying texture coordinates with ARB in the name


yes u might need to add ARB or EXT etc for certain things but stuff like multitexture which has been added to opengl (since 1.3) theres no need to add the ARB eg GL_TEXTURE1_ARB if u have the headers u can use GL_TEXTURE1 (cause theyre both defined as the same number)

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites

  • 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!