Jump to content
  • Advertisement


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


Please Help!!!

This topic is 6235 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 am using DX 7 and I have a couple questions: 1) Can a back buffer in a flipping chain be used for 3D rendering as well? Or does the rendering target HAVE to be an off-screen surface? 2) Is it possible to blt to an off-screen surface from the back buffer in a flipping chain? 3) How does Color fill with DDSurface->Blt and the DDBLTFX structure work? I can''t seem to get this to work, can someone show me an example of working code in this? Thanks for any help!!!

Share this post

Link to post
Share on other sites

1) I dont know... Sorry...

2) As far as I know it is possible to blit from the backbuffer to and offscreen surface. But what about trying it out to see if it is possible?

3) This will clear the left half part of the backbuffer (if resolution is 640x480) to white:

RECT rcDst = {0, 0, 320, 480};

ddBltFx.dwSize = sizeof(ddBltFx);
ddBltFx.dwFillColor = 0xffffffff;
lpDDSurf->Blt(&rcDst, NULL, NULL, DDBLT_COLORFILL, &ddBltFx);

Share this post

Link to post
Share on other sites
Thanks for replying!

I did try blt''ing from the back to another surface, but it didn''t work for me so I figured I would ask here on the forum to see if I was doing something wrong.

What is most common for question 1: Do you normally have a seperate surface specifically for rendering?

Share this post

Link to post
Share on other sites
Q1. Nope, you simply use a surface in the flip chain as usual.

The following are the flags we used on Pac-Man:Adventures In Time when creating the flip chain:


The surface used as the render target is obtained with GetAttachedSurface() with ddsCaps.dwCaps set to DDSCAPS_BACKBUFFER

BTW: if you''re doing any software rendering or locking the surface for update with the CPU, then it is often better to create an extra offscreen surface in system or AGP memory which you then Blt() to the backbuffer.

Simon O''''Connor
Creative Asylum Ltd

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!