Game Development Community

multitexturing

by Max Robinson · in Torque Game Engine · 09/15/2002 (11:09 am) · 1 replies

Just a quick question, I want to get multi texturing on my shockflash class, but I have 0 experience with this sort of thing. Is it absolutely impossible to do multitexturing on them without drawing the shape 2 times over? I'd hate to do this, because it would be 2x the work for the computer right? Or is it smarter than that? Is there a built in way to do 2 textures on the same set of vertices without drawing on them 2x?

#1
09/16/2002 (5:21 am)
Max,

Multi-texturing is just that, texturing the same 'spot' multiple times. What you require is known as single-pass multi-texturing and yes, you can do this easily so that the geometry is processed only once.

The only thing you have to be careful with is that you must check for support on the graphics card plus the actual number of texture units available.

Doing this is simple as there are existing calls in the engine that will check for the appropriate support. I don't propose to type up a tutorial on multi-texturing as there are many on the net. If you want to see it implemented in Torque then you could do worse than download my fluid rendering and look at the "fluidRender.cc" file where I check for multi-texturing plus query the number of texture units available so that I can do either a two-pass or single-pass as supported.

If you can't find any decent tutotials then get back to me and I'll dig some up for you.

If you've got any specific questions then again, just ask.

All the best,

- Melv.