Shirakana
04-08-2008, 05:00 AM
Hi all !
I think I know the theory about multipass rendering but I still couldn't see what the implementation should look like (in OpenGl for me).
Should this be like:
void draw() {
/* pass 1 */
-- special instructions for pass 1 --
for each object {
drawObject(); /* = Gl instructions */
}
/* pass 2 */
-- special instructions for pass 2 --
for each object {
drawObject(); /* = Gl instructions */
}
}
Or something like:
void draw() {
for each object {
/* pass 1 */
-- special instructions pass 1 --
drawObject(); /* = Gl instructions */
/* pass 2 */
-- special instructions pass 2 --
drawObject(); /* = Gl instructions */
}
}
or maybe two calls to draw() with a pass number as parameter ?
or something really different ?
What about culling, raterising and other fixed pipeline stuff for multipass rendering ? Done for each object each pass ?
Thanks for giving me some clues !
I think I know the theory about multipass rendering but I still couldn't see what the implementation should look like (in OpenGl for me).
Should this be like:
void draw() {
/* pass 1 */
-- special instructions for pass 1 --
for each object {
drawObject(); /* = Gl instructions */
}
/* pass 2 */
-- special instructions for pass 2 --
for each object {
drawObject(); /* = Gl instructions */
}
}
Or something like:
void draw() {
for each object {
/* pass 1 */
-- special instructions pass 1 --
drawObject(); /* = Gl instructions */
/* pass 2 */
-- special instructions pass 2 --
drawObject(); /* = Gl instructions */
}
}
or maybe two calls to draw() with a pass number as parameter ?
or something really different ?
What about culling, raterising and other fixed pipeline stuff for multipass rendering ? Done for each object each pass ?
Thanks for giving me some clues !