There are some differences that are not immediately clear to people that want to convert a "standard" sketch to an xr sketch.
draw function gets called once per eye
the standard frameRate for headsets is usually 90 fps instead of 60 fps for screen based devices
availability of the calculate function
The obvious effect is that sketches will run faster than expected. Converting from a 60 fps sketch would make the draw call get called 180 times ( 90 fps * 2 eyes ) on a headset device for instance.
I'll document this and also think about adding examples that uses the frame between times, similar to time.deltaTime in Unity. This would allow for a quicker transition of a sketch than using a separate calculate function, because it would mean less refactoring.
I haven't completely though all this through just yet, but some things that I think need to be addressed.
There are some differences that are not immediately clear to people that want to convert a "standard" sketch to an xr sketch.
draw
function gets called once pereye
frameRate
for headsets is usually 90 fps instead of 60 fps for screen based devicescalculate
functionThe obvious effect is that sketches will run faster than expected. Converting from a 60 fps sketch would make the draw call get called 180 times ( 90 fps * 2 eyes ) on a headset device for instance.
I'll document this and also think about adding examples that uses the frame between times, similar to
time.deltaTime
in Unity. This would allow for a quicker transition of a sketch than using a separatecalculate
function, because it would mean less refactoring.I haven't completely though all this through just yet, but some things that I think need to be addressed.