Forums Minimize
 
 
Neoforce ControlsNeoforce ControlsDiscussionsDiscussionsSupportSupportHow to Avoid Purple Flashing BackgroundHow to Avoid Purple Flashing Background
Disabled 
Previous
 
Next
 Disabled
New Post
 1/6/2010 2:17 PM
 
 Modified By Ryann  on 1/9/2010 1:29:59 PM

Hello,

this problem has been here with us for a while. Now it seems we have all the info needed to make a statement about this and how to avoid this behavior.

The purple flickering is noticeable while using RenderTargetUsage.DiscardContents for rendering to textures. Neoforce is rendering every control to a texture, so switching between render targets is pretty common. in XNA, every time you switch to new render target, the previous render target gets cleared with the purple color (oficially undefined content). This is not happening for RenderTargetUsage.PreserveContents, so the samples are working just well, while for your application this doesn't have to be the case.

The correct approach how to use Neoforce in these conditions is as follows:

1) let Neoforce draw controls in another render target
2) resolve and save texture from Neoforce render target
3) draw your stuff to back buffer
4) draw Neoforce texture at the end

You can see a sample project of this approach in Neoforce samples folder called RenderTargets or in the new Central application.


Tom Shane
New Post
 1/9/2010 1:30 PM
 

Removed link to RenderTargets sample, since it is updated and included in the new installation package.


Tom Shane
New Post
 2/16/2010 5:32 PM
 
Hi Tom!
I can't seem to get it work (3D + GUI), but I would love to!
Since I haven't exercised with RenderTargets, I don't know how to solve the problem.
Sure I could learn much about RenderTargets, but still, that won't solve that problem, I think.

Hope you can comprehend that, much thanks!
New Post
 2/16/2010 5:45 PM
 
If you send me your sample solution, I could take a look what your problem could be. Without providing more details I'm affraid I can't help.

Tom Shane
New Post
 2/16/2010 5:52 PM
 
Ok, I'll create a new example solution then, providing some code with it.
How to send it to you? By email?

Cem
New Post
 2/16/2010 6:26 PM
 
You can PM it or email, either is ok.

Tom Shane
Disabled 
Previous
 
Next
 Disabled
Neoforce ControlsNeoforce ControlsDiscussionsDiscussionsSupportSupportHow to Avoid Purple Flashing BackgroundHow to Avoid Purple Flashing Background