Sign in to follow this  

Sudden E_FAIL graphics initialisation error...

Recommended Posts

CdrTomalak    272

Although this might sound implausible, this morning when compiling my game I got a run-time error: E_FAIL: An undetermined error ocurred (-2147467259).


The sequence of code is:


			// DirectX DXGI 1.1 factory
			factory1 = new SlimDX.DXGI.Factory1();
			// The 1st graphics adapter
			adapter1 = factory1.GetAdapter1(0);

			description = new SlimDX.DXGI.SwapChainDescription()
                BufferCount = 2,
                Usage = SlimDX.DXGI.Usage.RenderTargetOutput,
                OutputHandle = this.Handle,
                IsWindowed = true,
                ModeDescription = new SlimDX.DXGI.ModeDescription(0, 0, new SlimDX.Rational(60, 1), SlimDX.DXGI.Format.R8G8B8A8_UNorm),
                SampleDescription = new SlimDX.DXGI.SampleDescription(1, 0),
                Flags = SlimDX.DXGI.SwapChainFlags.AllowModeSwitch,
                SwapEffect = SlimDX.DXGI.SwapEffect.Discard
			SlimDX.Direct3D11.FeatureLevel[] featureLevels = new SlimDX.Direct3D11.FeatureLevel[] { SlimDX.Direct3D11.FeatureLevel.Level_10_1 };
			if(debug){MessageBox.Show( "InitialiseGraphics()...2");}
				out graphics, 
				out swapChain

The swapChain creation code is failing, whereas yesterday is was fine. Nothing has been changed here at all, so I'm completely stumped. I've tried changing the feature level back down to 9_1 but this doesn't work. I'm baffled. Any ideas?sad.png

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this