Moved Oculus enable drawing to user side...
Still thinking about the best way to manage this...
This commit is contained in:
parent
3fb1c446ea
commit
2ff2096b36
2 changed files with 7 additions and 3 deletions
|
@ -53,6 +53,8 @@ int main()
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
if (IsOculusReady()) BeginOculusDrawing();
|
||||||
|
|
||||||
Begin3dMode(camera);
|
Begin3dMode(camera);
|
||||||
|
|
||||||
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
|
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
|
||||||
|
@ -62,6 +64,8 @@ int main()
|
||||||
|
|
||||||
End3dMode();
|
End3dMode();
|
||||||
|
|
||||||
|
if (IsOculusReady()) EndOculusDrawing();
|
||||||
|
|
||||||
DrawFPS(10, 10);
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
|
|
|
@ -521,7 +521,7 @@ void BeginDrawing(void)
|
||||||
updateTime = currentTime - previousTime;
|
updateTime = currentTime - previousTime;
|
||||||
previousTime = currentTime;
|
previousTime = currentTime;
|
||||||
|
|
||||||
if (IsOculusReady()) BeginOculusDrawing();
|
//if (IsOculusReady()) BeginOculusDrawing();
|
||||||
|
|
||||||
rlClearScreenBuffers(); // Clear current framebuffers
|
rlClearScreenBuffers(); // Clear current framebuffers
|
||||||
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
|
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
|
||||||
|
@ -536,7 +536,7 @@ void EndDrawing(void)
|
||||||
{
|
{
|
||||||
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
|
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
|
||||||
|
|
||||||
if (IsOculusReady()) EndOculusDrawing();
|
//if (IsOculusReady()) EndOculusDrawing();
|
||||||
|
|
||||||
SwapBuffers(); // Copy back buffer to front buffer
|
SwapBuffers(); // Copy back buffer to front buffer
|
||||||
PollInputEvents(); // Poll user events
|
PollInputEvents(); // Poll user events
|
||||||
|
@ -2675,7 +2675,7 @@ static void *MouseThread(void *arg)
|
||||||
int mouseRelX = 0;
|
int mouseRelX = 0;
|
||||||
int mouseRelY = 0;
|
int mouseRelY = 0;
|
||||||
|
|
||||||
while (1)
|
while (!windowShouldClose)
|
||||||
{
|
{
|
||||||
if (read(mouseStream, &mouse, sizeof(MouseEvent)) == (int)sizeof(MouseEvent))
|
if (read(mouseStream, &mouse, sizeof(MouseEvent)) == (int)sizeof(MouseEvent))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue