PDA

View Full Version : Multitexture?



haigu
09-13-2000, 09:00 PM
Is there any tutorial on multitexturing?
I searched for documents and sample codes,but they are too fragmented. I cannot understand very well.
So is there any systematic explanations on multitexture and other extensions?

Bob
09-13-2000, 09:49 PM
NeHe (http://nehe.gamedev.net/) got some nice tutorials, at least one covering multitexturing.

drakaza
09-14-2000, 02:22 AM
haigu,
if you want some simple source code
showing you basic, working multitexture,
email me, and i can send you some http://www.opengl.org/discussion_boards/ubb/smile.gif

LordKronos
09-14-2000, 05:59 AM
The nVIDIA developers site has a simple multitexture demo with source. Havent looked at it personally, but it might be of help:
http://www.nvidia.com/Marketing/Developer/DevRel.nsf/bookmark/86F94271D4318CAA88256945007FD1A0

zed
09-15-2000, 04:35 PM
i done one a couple of weeks ago http://members.xoom.com/myBollux hopefully ill get around to writing a demo of another extension this weekend

haigu
09-15-2000, 08:45 PM
Thanks for replying, I have understand something.
But I have another question:
I saw 2 implementations one is
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1, 0);
and another is
glActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoord2f(...);
Do they have the same effect?

drakaza
09-15-2000, 10:23 PM
Well, it seems as though using the actual "glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1, 0);
" would be better because you are not calling ActiveTexture() twice...which means less state changes

(unless there is the odd chance that glMultiText..() calls activetexture itself)

DFrey
09-16-2000, 05:39 AM
I think there is a very small advantage to using the second form. Since if carefully coded, you can create your single pipeline and it will work in either a single texture mode, or a multitexture mode. In other words, less code required. This comes in handy when writing pixel shaders from scratch using OpenGL 1.1. But now, you've perked my interest, would using glMultiTexCoord2fARB be a little faster when drawing a multitextured poly? Cause it really would not require all that much extra code for me to implement. Hmmmmmmmmm. Guess I have some testing to do. http://www.opengl.org/discussion_boards/ubb/smile.gif

Gorg
09-16-2000, 10:46 AM
From the red book you can assume that there is no difference. Because using the first unit is really like not using multitexture. This was took(but expressed in my words) from the multitexture section of the red book.