Jump to content
  • Advertisement


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

Guest Anonymous Poster

How do yo write a function to copy the Double Buffer in this situation

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

Guest Anonymous Poster
if yo use this code:
video_buffer = (UCHAR *)ddsd.lpSurface;
lpitch = ddsd.lPitch;

Then to plot a pixel yo use:
double_buffer[x+y*lpitch] = color;
I believe

How would yo copy the double_buffer to the video_buffer without doing that computation every pixel, just when yo copy the double_buffer,
Thanks for the Help,

Share this post

Link to post
Share on other sites
Hello Esap1

You want to copy the whole double buffer to the primary surface ? Then do it like this (using your variable names):

video_buffer->Blt(NULL, double_buffer, NULL, DDBLT_WAIT, NULL);


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!