Set Front/Backbuffer to draw stuff

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

hi...
very long time ago i posted a text with following two needed commands for game devs i.e. - seems the entry was removed or deleted!? However... i will post it again...

What about commands like:

Code: Select all

    UseFrontBuffer()
    UseBackBuffer()
I think it could be very usefull if you want generate/precalc any graphic in the background "BackgroundBuffer()" and drawing for example a progressbar or something else on the "FrontBuffer" of the screen...


PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Mhhhh... since PB has commands to create Images, Sprites... this is maybe no longer needed...!? It was just an idea at times, when PB havent supported commands to create sprites :wink:


PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.

From your first post, it sounded like you wanted to draw on the front buffer (while it is being displayed) and then switch back to the backbuffer? (PB seeming to work always on the backbuffer ATM.)

Images would be no use since drawing them with DrawImage would put them onto the backbuffer. Correct? I don't know about sprites though, but I guess it would be nicer to be able to draw to the screen rather than have a sprite *and* screen (for simple stuff).




--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

hi tinman..
maybe i should try to explain it on a better way... For example you start a game and showing a logo with a progressbar you will draw with 2d draw commands... (normaly this progress will everytime flip the buffers to get the new drawed stuff from background buffer to the forgroundbuffer... also to the users screen...

But now we have the reason where you want to display the same stuff (logo incl progressbar to the user on frontbuffer) and while this time we are generating some stuff and draw it on the backbuffer... (ofcourse you could draw to a created sprite/image instead direct to the backbuffer screen... (this methode is from old amiga times, when i painted some stuff on the background... :wink:

hope you know now what i mean... also in fact of the commands to create sprites/images, i think its not really longer needed... (would be sence to draw on backbuffer if you run your game in windowedmode i.e) Not so important atm...


PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.

I understood what you meant about drawing directly to the front buffer, but thanks for explaining the sprite/image part - I didn't get that (doh :)

I'd like to see the ability to draw directly to the front buffer though :)



--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

All is double buffered, so writing directly on the front buffer will go to visual glitches etc.. The best is to draw directly on a sprite, as MrVain say.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
Originally posted by fred

All is double buffered, so writing directly on the front buffer will go to visual glitches etc.. The best is to draw directly on a sprite, as MrVain say.
Do sprites get displayed properly on windowed screens and does drawing to them use hardware acceleration?

I don't care for visual glitches when drawing to the front buffer (as long as it is only flickering, and not corruption) since I am using a screen for the display in an application and it will not be refreshed often.


--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Ok, I will add this possibility then..

Fred - AlphaSND
Post Reply