Jump to content

  • Log In with Google      Sign In   
  • Create Account

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 08 November 1999 - 11:43 PM

if yo use this code:
lpddsprimary->Lock(NULL,&ddsd,DDLOCK_SURFACEMEMORYPTR,NULL);
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,


Sponsor:

#2 VirtualNext   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 November 1999 - 11:43 PM

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);

VirtualNext





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS