Game Development Community

caching render results?

by Matthew Franklin · in Torque Game Engine · 09/21/2002 (3:36 pm) · 2 replies

I have a viewport that isn't going to be rendered every frame. What do you think would be the best way to go about doing that?

Right now it's a control overriding processCameraQuery. I suppose I'll want to override onRender, and do something to cache the resultant image before drawing to the main offscreen image?

#1
09/22/2002 (2:26 am)
Matthew,

Your best way of doing this would be to render your view into a bitmap and then continue to render the bitmap itself.

A good example of how to do this would be the function cPanoramaScreenShot in \game\game.cc (Line 1135) which renders a panarama of views and dumps them as a png.

You should be able to use a similar methodology to create your bitmap and get it into a card texture.

- Melv.
#2
09/22/2002 (10:06 am)
Excellent! Exactly what I was looking for. Thanks.