Archived

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

Textures

This topic is 5143 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
dev->CreateTexture(640,480,0,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&m_pBackground,NULL)

the program failed whem doing this.....is there anything that is wrong?

Share this post


Link to post
Share on other sites