Game Development Community

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

#1
12/08/2004 (3:45 am)
Heres a very bried overview(what i found out from looking into glowBuffer, but you might want to wait around for the GG corrections :P ).

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
#2
12/08/2004 (10:13 am)
You have the engine source code. If you look in there you should be able to figure it out.
#3
12/08/2004 (5:00 pm)
Looking in the source will give you all the details, all he wanted was an overview.