bjornblissing / osgoculusviewer

An OsgViewer with support for the Oculus Rift
Other
106 stars 67 forks source link

Fix image corruption when resizing viewer window with MSAA enabled. #69

Closed ChrisDenham closed 8 years ago

ChrisDenham commented 8 years ago

I noticed that when MSAA is enabled, and you move or resize the viewer window, the eye images get corrupted. This seems to be the result of my changing the camera setRenderTargetImplementation to FRAME_BUFFER instead of FRAME_BUFFER_OBJECT, which has consequences for OSG's window move/resize handler. So, instead of bypassing normal OSG FBO camera setup in this way, I have added an initial camera draw callback, which disables the setup using the RenderStage cameraRequiresSetup flag that seems to be designed for this purpose.