Skip to main content
GameDev.net gamedev.net
🔒 Locked

Sudden E_FAIL graphics initialisation error...

Started by CdrTomalak Mar 1, 2013 at 10:36 AM 1 replies 1.8k views
Original Post
CdrTomalak
CdrTomalak

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");}
	
			SlimDX.Direct3D11.Device.CreateWithSwapChain(
				adapter1, 
				SlimDX.Direct3D11.DeviceCreationFlags.Debug, 
				featureLevels,
				description, 
				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

Yourself
Yourself

You use the debug flag and since a windows update, that is not longer supported..

see this topic for a dissucsion (and solutions).

CdrTomalak
CdrTomalak

THANK YOU !!!!!!!!!!!!!!!

I thought I was going mad.tongue.png

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.