Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

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   

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,


#2 VirtualNext   Members   

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.