Archived

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

tj963

Out of Memory Error

Recommended Posts

Hi, I''m writing a game with DX8 and It works fine so far on my old 233MMX w/ 4M VRAM computer which I''m writing some of the base code on. When I test it on my 500 w/ 16M VooDoo3, I get at out of memory error trying to create the Device. Anybody have any idea what''s going on? I checked the resolution etc. to make sure they were supported and yes they are.
  
    D3DPRESENT_PARAMETERS g_d3dpp;
    ZeroMemory( &g_d3dpp, sizeof(g_d3dpp) );
    g_d3dpp.Windowed         = !FullScreen;
    g_d3dpp.BackBufferCount  = 1;
    g_d3dpp.SwapEffect       = D3DSWAPEFFECT_DISCARD;
    g_d3dpp.EnableAutoDepthStencil = TRUE;
    g_d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
    if( FullScreen )
    {
        g_d3dpp.hDeviceWindow    = hWnd;
        g_d3dpp.BackBufferWidth  = Width;
        g_d3dpp.BackBufferHeight = Height;
        g_d3dpp.BackBufferFormat = D3DFMT_R5G6B5;
    }
    else
    {
        g_d3dpp.BackBufferFormat = mDesktopMode.Format;
    }

if(FAILED(mD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &g_d3dpp, &mD3DDevice ))) return CreateError(1, "Couldn''t create D3DDevice", "Couldn''t create D3DDevice");
  
thanks in advance for any help. tj963

Share this post


Link to post
Share on other sites