This project is read-only.

Upgrading Project from 3.1 to 4.0

Jan 25, 2011 at 11:45 AM


I have coverted my project from XNA 3.1 to XNA4, and have added the Neoforce 3.0 References to my project.  I have a problem were only the neoforce mouse cursor is dispalyed and the rest of my controls are invisible.  The only thing I can think as a caused to the controls disappearing is the use of ReanderTarget(), as this has been changed from 3.1.  Please can you let me know how I need to correct this problem?

I have included the code from 3.1, which will not compile in 4.0 due to the updated.

Just after initialising neforce I have:

neoforceManager.RenderTarget = new RenderTarget2D(GraphicsDevice, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);

Then in the draw:

Texture2D target = neoforceManager.RenderTarget.GetTexture()


Feb 20, 2011 at 11:12 PM

I have the same problem...

But without setting the Rendertarget...

Feb 21, 2011 at 6:35 PM

I solved this with using Manager.BeginDraw() and EndDraw instead of Draw().