Skip to main content
gamedev.net
🔒 Locked

basic rendering

Started by rangler Jun 7, 2004 at 12:37 AM 4 replies 800+ views
Original Post
rangler
rangler
Hi, I am very new at making games (working on first). My question is: If you have a double buffer system, which makes more sense? 1) You put the "draw from back buffer to front buffer" function in its own thread and frame rate sync it. or 2) In your main loop update & draw all the sprites than call "draw from back buffer to front buffer".
//My SignatureString sig = "Rangler";System.out.println(sig);
Joeman
Joeman
Wow! hold on a sec, are you using DirectX? if so what version?
Zipster
Zipster
Avoid the extra thread. Besides, the back buffer is hardly ever literally copied to the front buffer. It''s more along the lines of swapping the pointer that points to the back buffer with the pointer that points to the front buffer, and vice versa. Both buffers thus switch rolls each frame.
rangler
rangler
Im using win32 GDI. The Front and Back buffer are both HDC. I am using BitBlt() to copy the back to the front.
//My SignatureString sig = "Rangler";System.out.println(sig);
rangler
rangler
So if I don''t put it into its own thread how can I program a constant frame rate, so I can set the animation speed?
//My SignatureString sig = "Rangler";System.out.println(sig);

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.