Two easy DirectX8 questions

Started by
3 comments, last by Mark Tanner 22 years, 8 months ago
Two small questions about using the DX8 samples: 1. How do you modify any of the samples to start up in FullScreen mode instead of in a window? CMyD3DApplication::CMyD3DApplication() { m_strWindowTitle = _T("DX8 Test"); m_bUseDepthBuffer = TRUE; m_bWindowed = FALSE; m_dwCreationWidth = 640; m_dwCreationHeight = 480; m_bShowCursorWhenFullscreen = FALSE; } This doesn''t seem to do the trick. 2. Why does the default (auto) zbuffer default to 16bit? All of the edges are jagged as hell compared to DirectX7 D3DX. Thanks to anyone answering this, Mark
Advertisement
1) I dont have the code on hand, though I think the code you need is in the Donuts3D sample app in the DX8 SDK. Ill post the code in a few minutes.

2) It probably defaults to 16Bit to ensure compatibility on all 3D cards. Some do not support a 24Bit ZBuffer.

  Downloads:  ZeroOne Realm

  Downloads:  ZeroOne Realm

Here's the code for the DirectGraphics init function if it helps at all...maybe u need to modify this area:

          // Set up presentation parameters for the display    ZeroMemory( &g_d3dpp, sizeof(g_d3dpp) );    g_d3dpp.Windowed         = !bFullScreen;    g_d3dpp.BackBufferCount  = 1;    g_d3dpp.SwapEffect       = D3DSWAPEFFECT_DISCARD;    g_d3dpp.EnableAutoDepthStencil = TRUE;    g_d3dpp.AutoDepthStencilFormat = D3DFMT_D16;    if( bFullScreen )    {        g_d3dpp.hDeviceWindow    = hWndMain;        g_d3dpp.BackBufferWidth  = HorzSize;        g_d3dpp.BackBufferHeight = VertSize;        g_d3dpp.BackBufferFormat = g_d3dfmtFullscreen;    }    else    {        g_d3dpp.BackBufferFormat = g_DesktopMode.Format;    }      



  Downloads:  ZeroOne Realm


Edited by - SikCiv on July 30, 2001 10:31:17 PM

  Downloads:  ZeroOne Realm

My video card (a voodoo3 agp) supports only 16bit auto depth stencil. The edges of polygons are not jagged for me.
Go to NeXe and download one of his tuts his code asks whether you want the apps to launch in fullscreen or windowed mode. And yes they are dx8.

Eric Wright o0Programmer0o
AcidRain Productions
http://www.acidrainproductions.com
Eric Wright o0Programmer0o

This topic is closed to new replies.

Advertisement