Chapter 11: XNA Shooter - black screen
I installed the XNA shooter project (using the installer provided in the download), and although I can hear sounds, I get nothing but a black screen when I enter a mission - the main menu is fine.
My laptop exceeds the minimum requirements, and I have all relevant software installed.
Anything to do with monitor refresh rates maybe?
There is a log file saying:
[22:49:18] Creating RenderToTexture failed: System.InvalidOperationException: The method call is invalid.
at Microsoft.Xna.Framework.Graphics.RenderTarget..cto r(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 numberLevels, SurfaceFormat format, MultiSampleType multiSampleType, Int32 multiSampleQuality, Boolean isTexture2D)
at Microsoft.Xna.Framework.Graphics.RenderTarget2D..c tor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 numberLevels, SurfaceFormat format, MultiSampleType multiSampleType, Int32 multiSampleQuality)
at XnaShooter.Shaders.RenderToTexture.Create()
[22:49:37] Failed to execute Mission
Error: System.Exception: You can't call Resolve without first setting the render target!
at XnaShooter.Shaders.RenderToTexture.Resolve()
at XnaShooter.Shaders.ShadowMapShader.GenerateShadows (RenderDelegate renderObjects)
at XnaShooter.GameScreens.Mission.RenderLevelBackgrou nd(Single levelPosition)
at XnaShooter.GameScreens.Mission.Run(XnaShooterGame game)
at XnaShooter.XnaShooterGame.Draw(GameTime gameTime) .......
|