Textures
how do i render from 1 texture to another texture?
i need to know which functions to use, the rest can i check in the docs,
and how do i create an empty texture?
ok i found it...
but if use IDirect3DDevice9::SetRenderTarget to change render target, do i have to put my buffer back with IDirect3DDevice9::SetRenderTarget also?
but if use IDirect3DDevice9::SetRenderTarget to change render target, do i have to put my buffer back with IDirect3DDevice9::SetRenderTarget also?
You can use any format that the gfx driver reports as both valid texture and render target format.
You can ask the driver for this info, see IDirect3D9::GetDeviceCaps() for more info.
You can ask the driver for this info, see IDirect3D9::GetDeviceCaps() for more info.
Texture consists of one or more surfaces, depending on if you have mip levels or not.
Use IDirect3DTexture9::GetSurfaceLevel(0) to get the top level surface.
-Nik
Use IDirect3DTexture9::GetSurfaceLevel(0) to get the top level surface.
-Nik
i still don''t get this is what i did:
dev->CreateTexture(640,480,0,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&m_pBackground,NULL);
IDirect3DSurface9 *Temp = NULL;
m_pBackground->GetSurfaceLevel(0,&Temp);
m_pd3dDevice->SetRenderTarget(0,Temp);
m_pCurrenStringFont->DrawText( 0, 0, D3DCOLOR_ARG(255,255,255,0), string);
but he failed when trying to Getsurfacelevel
why?
dev->CreateTexture(640,480,0,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&m_pBackground,NULL);
IDirect3DSurface9 *Temp = NULL;
m_pBackground->GetSurfaceLevel(0,&Temp);
m_pd3dDevice->SetRenderTarget(0,Temp);
m_pCurrenStringFont->DrawText( 0, 0, D3DCOLOR_ARG(255,255,255,0), string);
but he failed when trying to Getsurfacelevel
why?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement