Archived

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

Basiror

multitexturing and tex coordinate pointer?

Recommended Posts

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