Anyone know any tutorials on multitexturing and blending?

Does any know of any links to documentation for multitexturing features of openGL? I’m looking for a way to blend two textures so that it is 75% of one texture and 25% of the other. Can anyone provide me with any tutorials?

buy a recent version of the redbook and learn it all at once.

hth

or read the opengl specifiaction for free.

hth

I would advice you to learn shaders (if you have the hardware, of course). Othervise look into ARB combiners. Nehe tutorials should cover it, I think.

Usually the demos that I download that use pixel shaders are extremely slow so I don’t think I have hardware support for that. Even if I did though, I still wouldn’t want to use them because there would be a large number people that wouldn’t be able to use my program and I’d want to market it to as many people as possible.

I’ve been going over the specs if it mentions anything about what I’m trying to do then it went right over my head. Could somebody at least tell me if it is possible to do without using shaders?

I don’t know of any tutorials but I’m sure Nehe has something. To do that kind of blending, it’s called interpolation.

glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, textureID);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA);

glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, textureID);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_INTERPOLATE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_PREVIOUS);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB, GL_CONSTANT);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA);

float mycolor[]={0.75, 0.75, 0.75, 0.75};
glTexEnfv(GL_TEXTURE_ENV, ..., mycolor);

Thanks V-man, I just ranked you up on gamedev.