Explorar el Código

Review issues on OpenGL 1.1

pull/812/head
Ray hace 6 años
padre
commit
87b75a6c95
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      src/rlgl.h

+ 4
- 0
src/rlgl.h Ver fichero

@ -1429,8 +1429,10 @@ void rlClearScreenBuffers(void)
// Update GPU buffer with new data // Update GPU buffer with new data
void rlUpdateBuffer(int bufferId, void *data, int dataSize) void rlUpdateBuffer(int bufferId, void *data, int dataSize)
{ {
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
glBindBuffer(GL_ARRAY_BUFFER, bufferId); glBindBuffer(GL_ARRAY_BUFFER, bufferId);
glBufferSubData(GL_ARRAY_BUFFER, 0, dataSize, data); glBufferSubData(GL_ARRAY_BUFFER, 0, dataSize, data);
#endif
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -3533,6 +3535,7 @@ void CloseVrSimulator(void)
// Set stereo rendering configuration parameters // Set stereo rendering configuration parameters
void SetVrConfiguration(VrDeviceInfo hmd, Shader distortion) void SetVrConfiguration(VrDeviceInfo hmd, Shader distortion)
{ {
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Reset vrConfig for a new values assignment // Reset vrConfig for a new values assignment
memset(&vrConfig, 0, sizeof(vrConfig)); memset(&vrConfig, 0, sizeof(vrConfig));
@ -3610,6 +3613,7 @@ void SetVrConfiguration(VrDeviceInfo hmd, Shader distortion)
SetShaderValue(vrConfig.distortionShader, GetShaderLocation(vrConfig.distortionShader, "hmdWarpParam"), hmd.lensDistortionValues, UNIFORM_VEC4); SetShaderValue(vrConfig.distortionShader, GetShaderLocation(vrConfig.distortionShader, "hmdWarpParam"), hmd.lensDistortionValues, UNIFORM_VEC4);
SetShaderValue(vrConfig.distortionShader, GetShaderLocation(vrConfig.distortionShader, "chromaAbParam"), hmd.chromaAbCorrection, UNIFORM_VEC4); SetShaderValue(vrConfig.distortionShader, GetShaderLocation(vrConfig.distortionShader, "chromaAbParam"), hmd.chromaAbCorrection, UNIFORM_VEC4);
} }
#endif
} }
// Detect if VR simulator is running // Detect if VR simulator is running

||||||
x
 
000:0
Cargando…
Cancelar
Guardar