Page 1 of 1

[Implemented] completing the FlipBuffers() command

Posted: Tue Apr 11, 2006 5:49 pm
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

Posted: Wed Apr 12, 2006 12:01 am
by va!n
i like using parameter like 0,1,2 must more instead typing any constant ^^

Re: completing the FlipBuffers() command...

Posted: Wed Apr 12, 2006 12:46 am
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.

Posted: Wed Apr 12, 2006 1:28 am
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)

Posted: Wed Apr 12, 2006 10:48 am
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 :)

Posted: Wed Apr 12, 2006 12:41 pm
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)

Posted: Wed Apr 12, 2006 2:18 pm
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.

Posted: Wed Apr 12, 2006 2:26 pm
by blueznl
not sure i like the wording

perhaps

pb_sync_enable
pb_sync_disable
pb_sync_savecpu

?

Posted: Wed Apr 12, 2006 2:32 pm
by Dare2
Yes, that would be a better fit with the other PureBasic constants (#PB_GroupingThing_ActionThing).