View Full Version : multitexturing with out having to blend meshes?
06-11-2005, 05:11 PM
i want to have my model with 2 textures blended but heck i dont want to render the model twice and blend them thats absolutely stupid ! can it be done by just blending the textures?
06-11-2005, 06:58 PM
Originally posted by bansheeogl:
i want to have my model with 2 textures blended but heck i dont want to render the model twice and blend them thats absolutely stupid ! can it be done by just blending the textures?use from the multitexturing functions.In this case you don't need to render a model twice.
06-13-2005, 12:02 AM
how do i multitexture ??
i have a sphere i want to apply a texture for that and apply a sphere map over that so it looks shiny but i dont want to render the sphere two times because its stupid to do that i think
i just want to do that but i dont seem to understand multi textures
Use glActiveTexture to set the texture unit to use - GL_TEXTURE0_ARB, GL_TEXTURE1_ARB etc.
Use glBindTexture to set the texture for the unit.
Use glMultiTexCoord to specify texture coordinates for the texture units.
Or, if you use vertex arrays, use glClientActiveTexture before you assign texture coordinate arrays. (There are multiple texcoord arrays possible, and this is the way to tell OGL which one you're specifiying)
06-13-2005, 03:23 AM
aww seems harder than i though t
i have the uvs in an array i must send all that ?
Hard? It's just four new calls, and you need only three. (There are extra calls for more advanced stuff, but that's not what you asked about)
Normal texturing uses glTexCoord, but doesn't allow you to specify coordinates for other texture units. So you need to replace it with glMultiTexCoord.
If you're using vertex arrays, you're already using glTexCoordPointer. Multitexturing just requires you to issue a glClientActiveTexture before specifying another texture coordinate array.
06-13-2005, 12:09 PM
im from portugal so watching a small sample in c++ can explain me more than 1000 words because it is easier that way to me
do you know some site where i can get an example on this ? thanks
06-13-2005, 01:28 PM
search for "MULTITEXTURE & LIGHTMAP" :
both article and zipped source code.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.