Game Development Community

Torque OpenGL Rendering Questions

by Brandon Pollet · in Torque Game Engine · 10/02/2005 (5:42 pm) · 2 replies

I've been working with the OpenGL rendering in TGE to try and implement a low level cel shading technique. I've tracked down the areas in the code where the polygons are rendered but, unless I am just missing something which is very possible, I can't get access to the vertices of the polygons to get the normals. All of the polys are rendered with calls to glDrawElements and I am having a hard time figuring out a way to draw the polys without that call. I know this is more of an OpenGL question but I'm sure there are alot of you on here that are pretty familiar with what I'm talking about. Can you tell me how I can get the normals for those polys, or how I can set up an inline drawing function to replace the glDrawElements ??

For example I'm talking about lines 303 to 317 in tsMesh.cc


Also I know the first reaction is going to be "Use the Shader engine". But I have already done that, I have a very sweet looking cel shading shader working in TSE but the rest of the engine is still too rough to allow us to get our prototype finished on time.

Thanks,

About the author

Brandon earned a Master's of Science in Computer Science from the University of Tulsa in 2005 before they asked him to leave. Since then he has worked in web development and mobile development all while honing his game design/programming skills.