What happened to GFXDevice::startActiveRenderSurface ?
by Thomas Phillips · in Torque Game Engine Advanced · 10/22/2006 (9:03 am) · 4 replies
I believe there used to be a GFXDevice::startActiveRenderSurface(GFXTexHandle *h) and a corresponding GFXDevice::endActiveRenderSurface().
Does anyone know what happened to these methods, or how the rendering in TSE has changed since the methods were done away with?
Tom
Does anyone know what happened to these methods, or how the rendering in TSE has changed since the methods were done away with?
Tom
#2
Does anyone know of any documentation, notes, discussion, doodles on napkins, etc. describing how GFXDevice (or really GFXD3DDevice) is now operating in TSE?
Tom
10/22/2006 (3:33 pm)
It doesn't look like the method name was simply changed; it looks like the theory of operation has actually changed. The pushActiveRenderSurfaces(void), popActiveRenderSurfaces(void), and setActiveRenderSurface(GFXTextureObject* surface, U32 renderTargetIndex, U32 mipLevel) all seem like they are supporting multiple render targets (as in render to texture), but without any documentation it's hard to tell for sure.Does anyone know of any documentation, notes, discussion, doodles on napkins, etc. describing how GFXDevice (or really GFXD3DDevice) is now operating in TSE?
Tom
#3
The one tricky thing you need to know about that call though is that to switch rendering to the back buffer, you need to pass in a NULL surface to setActiveRenderSurfaces. Or surround your setActive call with push/popActiveRender surface calls.
Look at glowBuffer.cpp for examples of how to use it.
10/23/2006 (12:24 pm)
Push and popActiveRenderSurfaces will push and pop current render targets onto a stack. setActiveRenderSurface() sets the current render target that TSE will render to. If you want multiple render targets at the same time, you need to call setActiveRenderSurface multiple times with each additional surface and surface index you want to render to.The one tricky thing you need to know about that call though is that to switch rendering to the back buffer, you need to pass in a NULL surface to setActiveRenderSurfaces. Or surround your setActive call with push/popActiveRender surface calls.
Look at glowBuffer.cpp for examples of how to use it.
Torque Owner Matt Vitelli
Edit:
And endActiveRenderSurfaces is now popActiveRenderSurface()