Thread: D3DFrameWork example

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    Bubba, shouldnt you be asking for the screen resolution and depth? i dont think knowing their RAM and CPU speed is gonna help much... (just a suggestion )

    and yeah worked for me,

    1024x768 at 32 bit geforce fx 5600

    EDIT: for the stencil buffer problem the other guy had, why dont you do something like this:

    Code:
    if (g_D3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, DisplayMode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D32) == D3D_OK)
    {
    	g_PresentParameters.EnableAutoDepthStencil = true;
        g_PresentParameters.AutoDepthStencilFormat = D3DFMT_D32;
    
    	Debug.LogInfo("<li>32-bit depth buffer selected");
    }
    else if (g_D3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, DisplayMode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D24X8) == D3D_OK)
    {
    	g_PresentParameters.EnableAutoDepthStencil = true;
    	g_PresentParameters.AutoDepthStencilFormat = D3DFMT_D24X8;
    
    	Debug.LogInfo("<li>24-bit depth buffer selected");
    }
    else if (g_D3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, DisplayMode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D16) == D3D_OK)
    {
    	g_PresentParameters.EnableAutoDepthStencil = true;
    	g_PresentParameters.AutoDepthStencilFormat = D3DFMT_D16;
    
    	Debug.LogInfo("<li>16-bit depth buffer selected");
    }
    else
    {
    	g_PresentParameters.EnableAutoDepthStencil = false;
    
    	Debug.LogInfo("<li>No depth buffer selected");
    }
    I use it in all my dx apps, and they run fine on all comps, well all the comps that i know of anyway...
    Last edited by X PaYnE X; 07-21-2004 at 04:17 PM.

Popular pages Recent additions subscribe to a feed