Game Development Community

New Terrain Texture Layer

by Nathan Bowhay - ESAL · in Torque Game Engine · 07/29/2006 (4:13 pm) · 0 replies

I am trying to render a .png image over the entire terrain (tiled) in TGE. I am using the RTS kit and have looked through the terr files. I have looked at how the circles in the RTS kit are rendered (the green one's under the units).

I created a new variable in terrData.h TextureHandle mGridTexture; under TextureHandle mSelectionTexture;.
Then in terrData.cc I added mGridTexture = TextureHandle("starter.RTS/client/ui/grid_white", BitmapTexture, true); under the mSelectionTexture...
Then I copied the function for the circle if (sgCurrSelectionTris) {... and changed mSelectionTexture.getGLName() to mGridTexture.getGLName()

I am pretty sure that sgCurrSelectionTris stores something to do with the position data x,y,z and angles, but I am not sure.

I need help getting my own variable that will have a tiled position over the entire terrain (like the crass/dirt is rendered).

I hope explained enough!

Thank you for any help in advance!