Replies: 1 comment
-
OSG works as a lazy rendering system, so when you attach/detech buffer to/from a RTT camera, it won't work immediately before the next frame. I would suggest implement a tiny render-to-texture system, and implement the ping-pong feature with GL commands by yourself. All the work can be done in a draw callback starting by obtaining the GLExtension pointer first: FYI, I have a similar implementation in the osgverse project: It doesn't implement ping-pong, but can handle RTT in a quick and non-intrusive way, and do framebuffer blit between deferred and forward scenes. Hope it would help a little. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone.
So I have implemented a rendering pass in OSG that uses a cullcallback fn to alternate the rendering output target between two textures and then feeds that to the next pass. Everything is working (I have been very careful) except the code in the cullcallback that detaches the camera from the previous texture and binds it to the next one. For some reason the camera is stuck bound to the first texture and keeps rendering to it. Has anyone encountered something similar?
Beta Was this translation helpful? Give feedback.
All reactions