Jump to content
  • Advertisement

Archived

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

Ataru

Multi-textures -- why?

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

My home system runs a GeForce3, and my project uses mult-texturing. This works everywhere I''ve tried it, but today I run it on a school machine, GeForce4 MX 460, and multi-texturing does not work. My system has detected the extension, so the video card should support it. Can anyone see anything in this code that would suggest why on a certain NVIDIA chip multi-texturing does not work?
  
void t_displayRec()
{
  glEnableClientState(GL_VERTEX_ARRAY);

  glClientActiveTextureARB(GL_TEXTURE0_ARB);
  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  glTexCoordPointer(2, GL_FLOAT, 0, tVA_tex);

  glClientActiveTextureARB(GL_TEXTURE1_ARB);
  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  glTexCoordPointer(2, GL_FLOAT, 0, tVA_blend);

  glClientActiveTextureARB(GL_TEXTURE2_ARB);
  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  glTexCoordPointer(2, GL_FLOAT, 0, tVA_tex);
  
  glActiveTextureARB(GL_TEXTURE0_ARB);
  glEnable(GL_TEXTURE_2D);
  terrainTex.Use();
 
  glActiveTextureARB(GL_TEXTURE1_ARB);
  glEnable(GL_TEXTURE_2D);
  terrainRough.Use();

  glActiveTextureARB(GL_TEXTURE2_ARB);
  glEnable(GL_TEXTURE_2D);
  am_currentLightMap();

  glVertexPointer(3,GL_FLOAT,0,tVA_vertices);

  curTimeStep++;

  t_createQuadTree(quad_root, MAX_LEVEL-1);
  t_displayRec(quad_root);

  glDisableClientState(GL_VERTEX_ARRAY);  

  glActiveTextureARB(GL_TEXTURE2_ARB);
  glDisable(GL_TEXTURE_2D);
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);

  glActiveTextureARB(GL_TEXTURE1_ARB);
  glDisable(GL_TEXTURE_2D);
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  
  glActiveTextureARB(GL_TEXTURE0_ARB);
  glDisable(GL_TEXTURE_2D);
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);

  
}
  
I see texture 1, but texture 2 and 3 are missing. I can''t see why this wouldn''t work on another NVIDIA card.

Share this post


Link to post
Share on other sites
Advertisement
O.k, it does actually work when multi-texturing 2 textures, but not 3. Is it possible a geoforce4 card can only multi-texture 2 textures in one pass?

Is there a way to find out how many textures can be layered?

Share this post


Link to post
Share on other sites
GeForce4 Ti cards have 4 texture units. A GeForce4 MX , however, is nothing but a modified GeForce2, and only supports two units.

quote:

Is there a way to find out how many textures can be layered?


glGetIntegerv(GL_MAX_TEXTURE_UNITS(_ARB), &count);


[edited by - Yann L on January 30, 2003 2:05:59 PM]

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!