Render loop overview plz
by Luis Anton Rebollo · in Torque Game Engine Advanced · 12/08/2004 (2:47 am) · 3 replies
Hi all.
I'm have intention to learn how TSE render, but i need some help.
Can anyone explainme a overview over the render loop?
Thx.
Sorry for my bad english
I'm have intention to learn how TSE render, but i need some help.
Can anyone explainme a overview over the render loop?
Thx.
Sorry for my bad english
About the author
I'm working on a port of Torque3D to OpenGL and Linux/SteamOS
Torque Owner Westy
The material datablocs (material object) reads data in and fitlers it into a stages[] array, along with matInstance to sort what is in which pass. Also sets some constants for the HLSL shaders etc(also setting some info in the sceneGraph).
Now when each object comes to its rendering it uses a renderImage. Usually in setupRenderImage a renderImage is created and added to a list in the sceneGraph (each type has its own list, standard,glow,refract etc). When the sceneGrpah comes to its rendering, it loops through its image of a certain type and does the rendering according to the renderImage sortType and/or what the current pass is for (also controlled by bools in the sceneGraph).
An example with the glow is if the bool glow in sceneGraph (sceneState i think) is true, then a renderTarget is set in the glowBuffer, and the shader is set by finding the reference by GlowBufferData (GlowBuffer dtabock) which is defaulted to the 'Blur' shader(wont go into how the glowBuffer works, as it could be quite lengthy).
Anyway I hope that gives at least a general idea of whats going on, but id wait for a G employee to correct me..hehe