According to the manual, the Sync() command is just automating the calls to update(), render(), and swap(). I wanted to use the commands seperately to create my own timing system, but I'm running into an issue, and I don't know if it's a bug, or I'm just doing something wrong.
This code works absolutely fine. Click the mouse or touch the screen, and the coordinates are displayed:
do
print("Sync test")
if getpointerstate() = 1
print("Pointer X:"+str(getpointerx())+" Pointer Y:"+str(getpointery()))
endif
Sync()
loop
However, when manually calling update, render, and swap instead of sync, getpointerstate() no longer registers anything:
do
print("Sync test")
if getpointerstate() = 1
print("Pointer X:"+str(getpointerx())+" Pointer Y:"+str(getpointery()))
endif
update(0)
render()
swap()
loop
After doing some testing, the issue seems to be with the swap() command. Can someone confirm this is a bug, or am I somehow using the commands incorrectly?