Jump to content
  • Advertisement

Archived

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

Bender77

DX9: diff between render target & off-screen plain surface

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

Since the DX9 sdk doc is sometimes messy or unprecise. I couldn''t figure out what that "CreateOffscreenPlainSurface()" method was for. I believe it''s like doing this in dx8: - Create a texture using render-target flag - Get the first surface of this texture - Set it with SetRenderTarget() - Render everything you want in it - Use that texture as you wish But I can''t understand what this CreateOffScreenPlainSurface is for ... please enlighten me ( Only answer if you know your topic )

Share this post


Link to post
Share on other sites
Advertisement
hi there,

if you know what IDirect3DDevice8::CreateImageSurface(...) does, then they are just the same with just an added D3DPOOL,

i guess it''s for placing pixels,

Share this post


Link to post
Share on other sites
I''m resurecting this thread because I had not received a answer which satisfy me completely, if anyone knows the difference between a render target and that OffscreenPlainSurface, please ... help

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i have the same question.
coming from DX 7. have spend few days trying to answer this type of questions. i ''would like simply port my GUI to DX9. Simply blit my windows''surface onto back buffer !
Maybe it''s time for me to begin wih OpenGL...
or stop programming

Share this post


Link to post
Share on other sites
It rocks!
like a whole lot and stuff!
it''s rad dude!
like totally cool man!
no way its bad to the bone!

well it''s ok .

this is what it is ?
in a nut shell;

Make your own mouse icon with directX Input

IDirect3DSurface9 *g_pBitmapSurface;
IDirect3DDevice9 * g_pd3dDevice;
HANDLE* pSharedHandle;


void GET_Surface()
{
g_pd3dDevice-> CreateOffscreenPlainSurface(64,64,D3DFMT_A8R8G8B8,D3DPOOL_SCRATCH,&g_pBitmapSurface,pSharedHandle) ;

D3DXLoadSurfaceFromFile(g_pBitmapSurface,0,0,"ARROW_T.bmp",0,D3DX_FILTER_NONE, D3DCOLOR_ARGB(0,0,0,0),0);
g_pd3dDevice-> SetCursorProperties(0,0,g_pBitmapSurface);
g_pd3dDevice-> ShowCursor(TRUE);
}

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!