Original Post
got following problem,when i clear a rendertarget with code line:
m_pD3DDevice->Clear(0L,NULL,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0,0,0), 1.0f, 0L );
i got the following error in the output:
Direct3D9: (ERROR) :DepthStencil Buffer must be at least as big as the RenderTarget.
The Rendertarget texture is created with the following code line:
D3DXCreateTexture(_device, iSideSize, iSideSize, 1,D3DUSAGE_RENDERTARGET,D3DFMT_R8G8B8, D3DPOOL_DEFAULT,&m_pRenderTexture);
where _device is a legal device and iSideSize is the size of the Texture. m_pRenderTexture is a IDirect3DTexture9*.
when i use sizes like 16,128,256, its ok, but when using
sizes like 512 and 1024 i got the error.
The gfx card is quite old (RIVA TNT2 ULTRA, or something like that) but i checked the caps and the minimum texture size is 2048.i had also testet this application on a system with a
GF4 MX, but didn''t get this error, atleast i didn''t
notice it.
so my question is what is the problem?
i guess it has something to do with the depthStencil, i didn''t attaced any type of depthstencil buffer to the texture, but i''m clearing the Z-buffer. if this is the problem I want to know how to attach the depthstencil buffer.
this is a second rendertarget i had created, i already
got a primary one,with working z-buffer.
/ thanks