I've got a problem when rendering to a texture. I render some UI stuff to a texture in order to get a nice cockpit for my cars/planes/helicopters, but for some reason unknown to me it messes up the "normal" UI. This happens under 32Bit Windows, the program is compiled with MinGW and running with OpenGL. Here are some screenshots:
First off: this is how it should look, RTT is disabled
Next up: the error. RTT enabled:
I also uploaded the test project:
The "main" function has a flag "bUseRenderToTarget" to toggle the render to target stuff. If this flag is set to "false" the error does not appear.
The problem disappears when I skip the replacement of the texture. It works like this:
- load the scene
- iterate all scenenodes
- check all textures
- replace the "dummy" textures specified in the RTT class construction by the render target
It works if I outcommet this line:
- cpp Code: Select all
The console shows an "Unsupported texture format" warning, but the texture appears as it should.
Does anyone have an idea what this could be?