Game Development Community

Map a texture onto a poly-list

by Frank Korf · in Torque Game Engine · 04/05/2007 (10:48 am) · 0 replies

My goal is to place a single, non-repeating texture on the terrain that is larger than a single terrain square.
Imagine walking into the town square and seeing a large town emblem laid across the entire square. This MUST work for non-flat surfaces as well.

I have spend a day or two looking at the TerrainRender::renderBlock function, and have decided that messing with that is beyond the scope of what I am trying to accomplish.

I have also explored the idea of decals, but I understand that they do not conform to adjusting terrain. (as is discussed here

Basically, all I want to do is load in a TextureHandle, gather a list of polygons from the terrain, and draw the image on the terrain.

I (sort of) know how to load the polygons into a ConcretePolyList.
resource

This is where I am stuck. I have the texture loaded in. I have a ConcretePolyList. I have no how to draw the texture on the polygons.

I did find this resource which said

Quote:then use that bitmap as a shadow texture and map it onto the poly-list.

But id does not go into detail about how to map a texture onto a poly-list.

Help! Any advice would be greatly appreciated.