GPWiki.org
GPWiki.org
It is currently Tue May 21, 2013 9:27 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: DirectX 8 Surfaces
PostPosted: Sun May 28, 2006 5:23 am 
Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
Alright, time to dive into something I've never delt with in my year+ of using DirectX 8 - surfaces. I really cant find much about surfaces for DirectX 8, either. What I need to do it create a surface, use the Direct3DDevice to draw to it, then display it to a picturebox (possibly by getting the HDC and using BitBlt?).

Anyone care to help me out? I'm totally lost on all of this. :P

_________________
NetGore - Open source online RPG engine


Top
 Profile  
 
 Post subject: Initialize
PostPosted: Sun May 28, 2006 5:56 am 
Maybe initialize the d3ddevice on the picturebox´s hwnd?


Top
  
 
 Post subject:
PostPosted: Sun May 28, 2006 5:59 am 
Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
I was actually thinking of doing that, problem is I have about 13 pictureboxes I want to draw to. Do you think this would have a drastic impact on speed or RAM? I dont see the speed being affected much (seeing that it wont be called every frame, only one is the game screen, rest is updated randomly) but it may take up a bit of RAM...

I may just do that, since it seems to be like it'd give me the most flexability and killpower.

_________________
NetGore - Open source online RPG engine


Top
 Profile  
 
 Post subject: Ram
PostPosted: Sun May 28, 2006 6:01 am 
Well its either you waste ram or you waste a lot of cpu power(bitblt is slow as heck) and since today's computers usualy have 512mb+ ram(usualy 1gb) wasting a bit of ram shouldn't be a problem. Back in the old days it was(remember quickbasic?).


Top
  
 
 Post subject:
PostPosted: Sun May 28, 2006 6:07 am 
Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
Very true, thanks for the insight. ;)

_________________
NetGore - Open source online RPG engine


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 28, 2006 9:01 am 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
Present call:

Quote:
HRESULT Present(
CONST RECT * pSourceRect,
CONST RECT * pDestRect,
HWND hDestWindowOverride,
CONST RGNDATA * pDirtyRegion
);


Quote:
hDestWindowOverride
[in] Pointer to a destination window whose client area is taken as the target for this presentation. If this value is NULL, then the hWndDeviceWindow member of D3DPRESENT_PARAMETERS is taken.


:)

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject: Cool
PostPosted: Sun May 28, 2006 9:03 am 
Cool didn't know that :lol


Top
  
 
 Post subject:
PostPosted: Sun May 28, 2006 1:42 pm 
Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
Thank you Almar! That makes everything real FREAKING easy! 8)

The pSrcRect and pDestRect were easy to figure out, too. Just have to set a normal ol' rect. GOD I love DirectX 8 now!! Weeee!!!! :spin :spin :spin :spin :spin :spin

_________________
NetGore - Open source online RPG engine


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 28, 2006 5:53 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
You're welcome :). It might be an idea to keep all your problems organized in one topic, makes it easier to know what you're talking about - I think. :)

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 28, 2006 6:54 pm 
Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
Well they are all seperate problems that come up at seperate times - just happen to all involve transfering a DirectX 7 program to DirectX 8. :P

_________________
NetGore - Open source online RPG engine


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group