• Advertisement
Sign in to follow this  

[SlimDX] I dont' know to create device

This topic is 3004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello~ I have developed with c# and MDX. hope MDX to chage to SlimDX. I have no idea without SlimDX's sampleframework. --------------------------------------------------- created code to create device. no error. but, device.present error. and, I hope to check device for acceptablelist. how?? ---------------------------------------------- m_Direct3D9 = new Direct3D(); m_presentParams = new PresentParameters(); m_presentParams.Windowed = true; m_presentParams.SwapEffect = SwapEffect.Discard; m_presentParams.AutoDepthStencilFormat = Format.D16; m_presentParams.EnableAutoDepthStencil = true; m_presentParams.BackBufferCount = 1; m_presentParams.BackBufferWidth = 320; m_presentParams.BackBufferHeight = 240; m_presentParams.BackBufferFormat = Format.X8R8G8B8; m_presentParams.DeviceWindowHandle = this.Handle; m_presentParams.PresentFlags = PresentFlags.DiscardDepthStencil; m_Device3d = new Device(m_Direct3D9, adapterOrdinal, dType, this.Handle, flags, m_presentParams); add comment -------------------------------------------------------------------- try { m_Device3d.BeginScene(); m_Device3d.EndScene(); m_Device3d.Present(); } catch( Exception ex ) { ex.Message => "try read and write protected memory. for the most, memory is invalid"; } error output window => A first chance exception of type 'System.AccessViolationException' occurred in SlimDX.dll ------------------------------------------------------- isAcceptablelist is apaptercheck for my directX function. ex) for( int i = 0; i < apapters; i++ ) { // check hardware function if( caps.VS > 2.0 ) if( caps.AlphaTest == treu ) } [Edited by - copycd on December 2, 2009 3:28:10 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by copycd
but, device.present error.
and, I hope to check device for acceptablelist.

how??
What error do you get? And what do you mean by an acceptable list? An acceptable list of what?

Do the Debug Runtimes have anything relevant to say?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement