Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / What is the backbuffer wdth/height?

Author
Message
Anomaly452
14
Years of Service
User Offline
Joined: 14th Aug 2011
Location: Cyberspace
Posted: 15th Aug 2011 20:02
I saw some commands in the help files:



I know that these have to do with the display mode, but what exactly is a backbuffer?

The wisest leader is the one that can avoid the conflict in the first place.
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Aug 2011 22:02
If I recall the backbuffer defaults to the same Width, Height, and Depth as your program.

When a game is running it generally does all of it's drawing to the backbuffer. When the time comes to display something to the screen, the backbuffer becomes the display on the screen, and what was on the screen becomes the backbuffer. They flip back and forth so you don't see drawing operations in progress on the screen.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Aug 2011 00:22
The Backbuffer width can differ from your screen width, sometimes the hardware adds a few extra bytes of data on the end. If you plan to do any memblock manipulation of the backbuffer, you need to take this into account. It caught me out once and all of my images were skewed as they went down the screen.

I don't know if the backbuffer height can differ.

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Aug 2011 01:50
The Bitmaps "Pitch" will give you the correct spacing between lines. The extra bytes padded onto the end allow for memory alignment and faster manipulation.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2026-07-11 17:41:44
Your offset time is: 2026-07-11 17:41:44