Rendering polygons
by Gerald Fishel · in Torque Game Engine · 03/26/2004 (6:04 pm) · 3 replies
Okay, I am getting into creating some new types of interiors to use with Torque, the whole 'brush' based interiors thing is killing me. I've already created a set of plugins for 3D Studio Max that exports all of my structures, I just need to figure out how to render them in Torque efficiently.
My basic needs are to be able to render a list of polygons, multitextured with 2 sets of texture coordinates (i.e. with static lightmaps). I will be handling the collision detection and visibility processing seperately, I just need some pointing in the right direction for how to render a list of multitextured triangles, and where a good place to insert the rendering code would be.
Can I just use OpenGL vertex arrays? If so, are there any special considerations I need to take into account for using vertex arrays in Torque? Since the Direct3D code doesnt seem to be all that great, I am not too concerned with it being cross-API, as long as it works fast under OpenGL.
What is the lowest level class that I can override to keep the objects friendly for integration in the World Editor?
Any thoughts will be much appreciated.
Thanks
My basic needs are to be able to render a list of polygons, multitextured with 2 sets of texture coordinates (i.e. with static lightmaps). I will be handling the collision detection and visibility processing seperately, I just need some pointing in the right direction for how to render a list of multitextured triangles, and where a good place to insert the rendering code would be.
Can I just use OpenGL vertex arrays? If so, are there any special considerations I need to take into account for using vertex arrays in Torque? Since the Direct3D code doesnt seem to be all that great, I am not too concerned with it being cross-API, as long as it works fast under OpenGL.
What is the lowest level class that I can override to keep the objects friendly for integration in the World Editor?
Any thoughts will be much appreciated.
Thanks
#2
I had seen the fxRenderObject tutorial when I first licensed Torque, but was not ready at that point to get into it. Then I couldn't find it again for some reason, doh. I think I have a pretty good idea of how to proceed now.
Thanks again
03/28/2004 (5:33 am)
Thanks Ben,I had seen the fxRenderObject tutorial when I first licensed Torque, but was not ready at that point to get into it. Then I couldn't find it again for some reason, doh. I think I have a pretty good idea of how to proceed now.
Thanks again
#3
03/28/2004 (8:37 am)
Glad to help you out. If you wait a few weeks, the TSE will be out and you can play with that, too. ;)
Associate Kyle Carter
Then, since you're gonna be essentially writing a replacement for Interior... you should read and understand the Interior class.
Torque uses OpenGL. Thus, you may use anything that OpenGL supports.