Ming_Lei Posted November 23, 2004 Posted November 23, 2004 Also I am writing a program that uses DirectX in full screen. I have the following code to create a device, but the system stops at the last line because there's a bug in the parameters. Here is the code: ==================================================== // Set our presentation parameters PresentParameters presentParams = new PresentParameters(); presentParams.Windowed = false; presentParams.SwapEffect = SwapEffect.Discard; presentParams.AutoDepthStencilFormat = DepthFormat.D16; presentParams.EnableAutoDepthStencil = true; Format current = Manager.Adapters[0].CurrentDisplayMode.Format; if(Manager.CheckDeviceType(0, DeviceType.Hardware, current, current, false)) // check valid { presentParams.BackBufferCount = 1; presentParams.BackBufferWidth = ScreenWidth; presentParams.BackBufferHeight = ScreenHeight; presentParams.BackBufferFormat = current; } // Create our device device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams); ============================================== What is the bug?? :confused: Quote
ThePentiumGuy Posted November 23, 2004 Posted November 23, 2004 I think it should be this.Handle :P Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Ming_Lei Posted November 23, 2004 Author Posted November 23, 2004 I have the problem solved. Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.