Sign in to follow this  

Is it Offscreen rendering?

This topic is 3047 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

Hi, First, I create a rendertaget for offscreen rendering, i.e. IDirect3DTexture9* pTexture; IDirect3DSurface9* pSurface_BackBuffer; IDirect3DSurface9* pSurface_Render; width = 256; height = 256; Levels = 1; Usage = D3DUSAGE_RENDERTARGET; Format= D3DFMT_A32B32G32R32F; Pool = D3DPOOL_DEFAULT; pSharedHandle = 0; device->CreateTexture(Width, Height, Levels, Usage, Format, Pool, &pTexture, pSharedHandle); ... Then, do rendering like this ID3DXEffect *effect; // assume initialized g_Device->GetRenderTarget(0,&pSurface_BackBuffer); pTexture->GetSurfaceLevel(0,&pSurface_Render); g_Device->SetRenderTarget(0,pSurface_Render); g_Device->BeginScene(); UINT n; effect->Begin(&n, 0); effect->BeginPass(0); // render something effect->EndPass(); effect->End(); g_Device->SetRenderTarget(0,pSurface_BackBuffer); And then, do the normal rendering. If I do it in this way, is it doing offscreen rendering of render target? If not, what functions do I need to call for offscreen rendering of render target? Thank you. Jacky

Share this post


Link to post
Share on other sites
The term 'off-screen rendering' just means that you aren't rendering into the backbuffer - so yes, I think what you are doing qualifies. However, what are you using the offscreen buffer for? As an input to some other rendering pass?

Share this post


Link to post
Share on other sites

This topic is 3047 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this