|
|
My graphic card is NVIDIA GeForce 7900 GT with 256MB memory.
I want to create a texture with the size of 4096x4096. But when I CreateDepthStencilSurface, it returns the error called D3DERR_OUTOFVIDEOMEMORY. How do I solved the problem?
#define SHADOW_MAP_SIZE=4096
// setup shadow map objects
V_RETURN(pd3dDevice->CreateTexture(
SHADOW_MAP_SIZE,
SHADOW_MAP_SIZE,
1,
D3DUSAGE_RENDERTARGET,
SHADOW_MAP_FORMAT,
D3DPOOL_DEFAULT,
&m_pShadowMapTex,
NULL
));
V_RETURN(m_pShadowMapTex->GetSurfaceLevel(0, &m_pShadowMapSurf));
V_RETURN(pd3dDevice->CreateDepthStencilSurface(
SHADOW_MAP_SIZE,
SHADOW_MAP_SIZE,
D3DFMT_D24S8,
D3DMULTISAMPLE_NONE,
0,
TRUE,
&m_pShadowMapZ,
NULL
)); |
|