• Announcements

Archived

This topic is now archived and is closed to further replies.

Two easy DirectX8 questions

Recommended Posts

Mark Tanner    100
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

Share on other sites
SikCiv    122
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.

Share on other sites
SikCiv    122
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; }

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

Share on other sites
Guest Anonymous Poster
My video card (a voodoo3 agp) supports only 16bit auto depth stencil. The edges of polygons are not jagged for me.