View Full Version : Multitexturing and Texture Matrix
12-12-2006, 08:41 PM
I am so happy I managed to implement Multitexturing in Visual Basic by making a DLL from C++!!!
Is it possible to do the following? I have a floor with two textures. The first one is a snow texture, and the second one is a fog texture.
I want to apply a texture transformation to just the fog texture and scroll, it but not to the snow texture (obviously, to keep it static).
I used to achieve this effect by using two polygon layers with different textures and blending. Of course I am not expecting to go back to that now that I managed to get Multitexturing support.
Any ideas will be helpful! :)
Thanks so much!
12-12-2006, 09:22 PM
Oooh!! I just got it!...
I guess that with glActiveTextureARB(GL_TEXTURE0_ARB) you select to which texture the changes go.
Could anybody post me a link of a tutorial that explains TextEnv?
I googled and there is not so much info on that and I had seen very long a go a tutorial which showed you all the different combination of parameters of TextEnv and the results... Although I can't find it.
The tutorial I followed contains the following but no explanation...
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB)
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1)
Thanks so much!
12-13-2006, 12:26 AM
Read OpenGL specs on glTexEnv, and specs for ARB_texture_env_combine.
This is what I did. I don't use tutorials. Specs seem difficult at first, but once you get through 2-3 specs you'll get addicted :)
12-13-2006, 06:56 PM
use 2 texture units
then bind 2 textures in difference,
one use the org texcoord
other scroll the texcoord
glVertex3f();/and so on/
combine color in fragment shader
12-15-2006, 03:27 AM
Originally posted by k_szczech:
Specs seem difficult at first, but once you get through 2-3 specs you'll get addicted :) k_szczech could you please point me as to where to get those specs? Blue book, red book, rainbow book/ ! haha
A web link would be greatly appreciated. :)
The official list of GL extensions is found here: http://www.opengl.org/registry/
Some of the newest "EXT" and "NV" ones (only implemented on NVIDIA G80 or so) are found on NVIDIA developer site: http://developer.nvidia.com/object/nvidia_opengl_specs.html
Hope this helps!
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.