Corrected bug on OpenGL 1.1
Set makefile to default OpenGL 3.3 compilation
This commit is contained in:
parent
b7b51569e2
commit
0fbd48a889
2 changed files with 9 additions and 3 deletions
|
@ -49,10 +49,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
|||
# define raylib graphics api to use (on RPI, OpenGL ES 2.0 must be used)
|
||||
GRAPHICS = GRAPHICS_API_OPENGL_ES2
|
||||
else
|
||||
# define raylib graphics api to use (OpenGL 1.1 by default)
|
||||
GRAPHICS ?= GRAPHICS_API_OPENGL_11
|
||||
# define raylib graphics api to use (OpenGL 3.3 by default)
|
||||
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_11 # Uncomment to use OpenGL 1.1
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_21 # Uncomment to use OpenGL 2.1
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_33 # Uncomment to use OpenGL 3.3
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
GRAPHICS = GRAPHICS_API_OPENGL_ES2
|
||||
|
|
|
@ -2645,6 +2645,10 @@ void InitVrDevice(int hmdDevice)
|
|||
vrEnabled = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_11)
|
||||
TraceLog(WARNING, "VR device or simulator not supported on OpenGL 1.1");
|
||||
#endif
|
||||
}
|
||||
|
||||
// Close VR device (or simulator)
|
||||
|
@ -2672,6 +2676,7 @@ bool IsVrDeviceReady(void)
|
|||
// Enable/Disable VR experience (device or simulator)
|
||||
void ToggleVrMode(void)
|
||||
{
|
||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||
if (vrDeviceReady || vrSimulator) vrEnabled = !vrEnabled;
|
||||
else vrEnabled = false;
|
||||
|
||||
|
@ -2683,6 +2688,7 @@ void ToggleVrMode(void)
|
|||
MatrixTranspose(&projection);
|
||||
modelview = MatrixIdentity();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Update VR tracking (position and orientation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue