Game Development Community

Render Quad with Material

by Guimo · in Torque Game Engine Advanced · 09/12/2007 (8:36 am) · 0 replies

Hi all,
I asked for this in the Engine forum but got no answer. Maybe it was the wrong place to ask so Ill try here. I hope someone can help me.

The question is simple. Given a material like this one:

new Material( MyMaterialName ) 
{ 
   mapTo = reference_name; 
   ...
}

I want to render a quad using this material. Given that at render time (in the renderObject method) I have the material name (MyMaterialName) and/or the mapTo reference (reference_name). How do I find the material using those references and how do I enable this material for rendering before sending the quad?

Thank you very much.

Guimo