Jump to content
  • Advertisement

Archived

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

bingo

where to put the back buffer?

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

I use directdraw and direct3d simultaneously. Most drawing is done with ddraw,some special effects useing d3d. So I don''t know where to put the back buffer,system memory or video memory? When in system memory,the d3d is very slowly,but if I put the back buffer in video memory,the speed is not good because too many drawing with ddraw. How can I do?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I don''t know what you mean by ''too much drawing'' but anyway:
put it in video RAM. Always!
If there is not enough video RAM free, DX will put it in system mem anyway, but always request it in videoRAM.

This way the flip operation can be performed by simply changing a pointer in the videocard''s hardware (DirectX does this for you), in stead of copying the contents of a backbuffer in systemmem into the display buffer.

Greetings,
Sven Vermeulen, Netherlands.

Share this post


Link to post
Share on other sites
Would it make a difference if you did all your ddraw stuff on a buffer in system memory, then blitted it to a backbuffer in video memory and did the d3d stuff there? Let the two systems do their stuff in the optimal environment and just have one big data transfer in the middle.

Is it possible for you to separate the two stages out in this way? Or are the d3d ops intermingled with draw ones?

This is the best solution I can think of.

ro

Share this post


Link to post
Share on other sites
Like you said, bingo, it''s going to be slow regardless of where you put it, because by accessing the surface with both D3D (GPU) and DDraw (CPU), you''re generating a lot of bus traffic. (I''m assuming that by "many drawing with DDraw" you mean doing lots of per-pixel stuff)

What I would try is to somehow emulate the DDraw stuff with D3D. Or you could try switching to DX8, which merges DDraw and D3D into a single API...

Good luck,

- Tom

Share this post


Link to post
Share on other sites
Thanks for everybody.
My english is poor,I''m sorry I can''t write clear.

I''m writing a 2D game,I define the image data format myself,
I write code for specially good effect:colorkey,alpha blending,
lighting,shading etc.But I can''t achieve some effect,so I use D3D.As much as I know,the Diablo II just like this.
Please give me more ideas. Thanks.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!