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?
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?
Associate Melv May
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.