PDA

View Full Version : problem of Multitexture



keepmoving
07-01-2010, 02:43 AM
I want to apply two textures to a single fragment,but I don't want to use the API glMultiTexCoord2f because I want to make it without the help of hardware. Then what should I do?
I have ever noticed that someone said in his blog that mutiple rendering can help me,but I don't know what's that mean.
I'm a beginners of opengl,so the answer of you is the more detailed the better.
thank you.

aqnuep
07-01-2010, 08:52 AM
If you mean multipass rendering then yes, most of the cases can be handled without multitexturing.
All you need to do is render the same geometry twice just with different textures and use blending to combine them.
Unfortunately you cannot do all kind of combining mechanisms with blending, but you can use additive blending and even multiplicative blending (if blend_square extension is present).
Also be sure to use LEQUAL for the depth buffer as with standard LESS depth comparison method the second drawing will result in no pixels written.

ZbuffeR
07-01-2010, 08:55 AM
Please do not cross-post !
Everybody can continue the discussion on the other topic here :
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=279738

keepmoving
07-01-2010, 09:34 AM
I'm a new comer.I'm anxious to know the answer.I'm sorry and thank you for reminding me.

keepmoving
07-01-2010, 09:44 AM
If you mean multipass rendering then yes, most of the cases can be handled without multitexturing.
All you need to do is render the same geometry twice just with different textures and use blending to combine them.
Unfortunately you cannot do all kind of combining mechanisms with blending, but you can use additive blending and even multiplicative blending (if blend_square extension is present).
Also be sure to use LEQUAL for the depth buffer as with standard LESS depth comparison method the second drawing will result in no pixels written.
thank you for your help.here is my current sitiuation:http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=279738#Post2797 38
i hope you can tell me something more detailed.if give me the code it would be perfect.