Skip to main content
gamedev.net
🔒 Locked

multitexturing and tex coordinate pointer?

Started by Basiror Nov 8, 2002 at 8:41 AM 4 replies 300+ views
Original Post
Basiror
Basiror
is there another routine to specify the texturecoordinates in array when you use multitexturing
http://www.8ung.at/basiror/theironcross.html
zedzeek
zedzeek
glClientActiveTexture.( GL_TEXTURE0 );
glTexCoordPointer..
glClientActiveTexture.( GL_TEXTURE1 );
glTexCoordPointer

etc

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
Basiror
Basiror
and that works?

cause there is an extra function for specifying texture coordinates with ARB in the name
http://www.8ung.at/basiror/theironcross.html
silvermace
silvermace
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);
zedzeek
zedzeek
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
Basiror
Basiror
ok thx
http://www.8ung.at/basiror/theironcross.html

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.