[Implemented] completing the FlipBuffers() command

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

[Implemented] completing the FlipBuffers() command

Post by Kale »

If you look at the manual for the FlipBuffers() command, it now takes a parameter. This parameter can have a value of:
0 : disable synchronization
1 : enable synchronization (default value)
2 : enable synchronization, with a CPU saver routine when the program doesn't consume all the CPU time (full screen mode only)
Have you forgotten constants for these? ;)

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_Enable_Sync_SaveCPU
--Kale

Image
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

i like using parameter like 0,1,2 must more instead typing any constant ^^
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Re: completing the FlipBuffers() command...

Post by Tranquil »

Kale wrote:If you look at the manual for the FlipBuffers() command, it now takes a parameter. This parameter can have a value of:
0 : disable synchronization
1 : enable synchronization (default value)
2 : enable synchronization, with a CPU saver routine when the program doesn't consume all the CPU time (full screen mode only)
Have you forgotten constants for these? ;)

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_Enable_Sync_SaveCPU
I agree. For better readability every number should be assigned to a constant.

@MrVain:
If you dont want to use the constant you can use the value as well.
Tranquil
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Shure it aint like this?

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Joakim Christiansen wrote:Shure it aint like this?

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
Yes that make more sense :)
--Kale

Image
Dummy
Enthusiast
Enthusiast
Posts: 162
Joined: Wed Jun 09, 2004 11:10 am
Location: Germany
Contact:

Post by Dummy »

Joakim Christiansen wrote:Shure it aint like this?

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
no

ppl would try this code, but it wouldn't have any effect!

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Disable_Sync|#PB_SaveCPU)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Dummy wrote:
Joakim Christiansen wrote:Shure it aint like this?

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Enable_Sync|#PB_SaveCPU)
no

ppl would try this code, but it wouldn't have any effect!

Code: Select all

#PB_Disable_Sync
#PB_Enable_Sync
#PB_SaveCPU
FlipBuffers(#PB_Disable_Sync|#PB_SaveCPU)
Im sure this could be implemented.
--Kale

Image
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

not sure i like the wording

perhaps

pb_sync_enable
pb_sync_disable
pb_sync_savecpu

?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Yes, that would be a better fit with the other PureBasic constants (#PB_GroupingThing_ActionThing).
@}--`--,-- A rose by any other name ..
Post Reply