Browse Source

Review issues on OpenGL 1.1

pull/812/head
Ray 5 years ago
parent
commit
87b75a6c95
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/rlgl.h

+ 4
- 0
src/rlgl.h View File

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

Loading…
Cancel
Save