Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3711
Number of posts: 9173

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
DOUBLE BUFFER C++/WIN32? Posted by Sagat on 5 Sept 2000 at 3:58 AM
1. Which class can represent a (fast) double buffer?<br>
2. How do I draw to it?<br>
3. How do I draw it to the screen?<br>
<br>
Any help will be appreciated. Thanks.


Edit Report
Re: DOUBLE BUFFER C++/WIN32? Posted by { Nihilanth } on 10 Sept 2000 at 7:40 PM
how do you draw to the screen?<br>
<br>
assuming that...<br>
LPDIRECTDRAWSURFACE4 lpddsprimary = NULL;<br>
<br>
you flip it like this:<br>
<br>
lpddsprimary->Flip(NULL, DDFLIP_WAIT);<br>
<br>
how do you draw to the 2x buffer? depends on what you wanna draw. lines? pixels? bitmaps?<br>
<br>
just e-mail me: halfnihilanth@hotmail.com<br>
<br>
<br>
<br>
<br>
<br>
<br>
: 1. Which class can represent a (fast) double buffer?<br>
: 2. How do I draw to it?<br>
: 3. How do I draw it to the screen?<br>
: <br>
: Any help will be appreciated. Thanks.<br>
: <br>
<br>



Report
Re: DOUBLE BUFFER C++/WIN32? Posted by Christinme7890 on 9 Apr 2001 at 3:11 PM
: how do you draw to the screen?
:
: assuming that...
: LPDIRECTDRAWSURFACE4 lpddsprimary = NULL;
:
: you flip it like this:
:
: lpddsprimary->Flip(NULL, DDFLIP_WAIT);
:
: how do you draw to the 2x buffer? depends on what you wanna draw. lines? pixels? bitmaps?
:
: just e-mail me: halfnihilanth@hotmail.com
:
:
:
:
:
:
: : 1. Which class can represent a (fast) double buffer?
: : 2. How do I draw to it?
: : 3. How do I draw it to the screen?
: :
: : Any help will be appreciated. Thanks.
: :
There is more stuff you have to do to initiate the direct draw primary buffer. First off you also need to create a secondary buffer:
LPDIRECTDRAWSURFACE4 lpddsprimary=NULL;
LPDIRECTDRAWSURFACE4 lpddssecond=NULL;

ZeroMemory(&ddsd,sizeof(ddsd));
ddsd.dwSize = sizeof( ddsd );
ddsd.dwBackBufferCount = 1;//tells how many back buffers there //are
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
lpDD->CreateSurface( &ddsd, &lpDDSPrimary, NULL );
//back buffer
ddscaps.dwCaps=DDSCAPS_BACKBUFFER;
lpddsprimary->GetAttachedSurface(&ddscaps,&lpddssecond);

any questions please post your question




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.