[Scummvm-git-logs] scummvm master -> 329333c2b5116cdf33441eb870bd02540ee0e08c
aquadran
noreply at scummvm.org
Sat Jul 12 09:11:17 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
329333c2b5 WINTERMUTE: Fixed crash. Create initial array buffer.
Commit: 329333c2b5116cdf33441eb870bd02540ee0e08c
https://github.com/scummvm/scummvm/commit/329333c2b5116cdf33441eb870bd02540ee0e08c
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-07-12T11:11:12+02:00
Commit Message:
WINTERMUTE: Fixed crash. Create initial array buffer.
Changed paths:
engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
index daa5f404a79..f84d58ad9e4 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
@@ -48,9 +48,15 @@ ShadowVolumeOpenGLShader::ShadowVolumeOpenGLShader(BaseGame *inGame, OpenGL::Sha
: ShadowVolume(inGame), _volumeShader(volumeShader), _maskShader(maskShader) {
_shadowVolumeVertexBuffer = 0;
+ glGenBuffers(1, &_shadowVolumeVertexBuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, _shadowVolumeVertexBuffer);
+ glBufferData(GL_ARRAY_BUFFER, 12 * _vertices.size(), _vertices.data(), GL_STATIC_DRAW);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
glGenBuffers(1, &_shadowMaskVertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, _shadowMaskVertexBuffer);
- glBufferData(GL_ARRAY_BUFFER, 4 * sizeof(ShadowVertexShader), nullptr, GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, 4 * sizeof(ShadowVertexShader), nullptr, GL_STATIC_DRAW);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
}
//////////////////////////////////////////////////////////////////////////
More information about the Scummvm-git-logs
mailing list