Archived

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

BahamutCube

Multitexturing + Vertex Arrays

Recommended Posts

Hello, everyone: Im having quite some frustration trying to get Multi texturing working on my program. Im using vertex arrays to render everything, it works ok with single texturing and multitexturing works only when rendering non-vertex array things... Has anyone got a GOOD source of information (tutorial / whatever) about multitexturing combined with vertex arrays? What i''ve found is either only multitexturing with no VA or a simple overview, wicho does not help me find why its not working... Thanks in advance.

Share this post


Link to post
Share on other sites
Well, the search function of this forum works really well. Really, this is one of the most frequently asked questions I''ve seen.

Share this post


Link to post
Share on other sites
The specification should contain everything you need.

What you need to remember, in brief, is that:

glClientActiveTexture() controls which texture coordinate set is specified when you call glTexCoordArray().

glActiveTexture() controls which texture object, and texture environment, gets specified when you call glBindTexture(), glTexEnv(), glTexParameter(), glTexImage2D(), etc.

Remember to set the bound texture, and bound texture coordinates, to NULL for the second unit before drawing something that only has a single texture, by the way!

Share this post


Link to post
Share on other sites