[Scummvm-git-logs] scummvm master -> bcf9bf753d6d61ae2c2576257272da0f624c4776
klusark
noreply at scummvm.org
Wed Nov 11 21:08:45 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
c8de8f4d52 GRIM: Measure blank text objects as one line tall
bcf9bf753d GRIM: Grow the blast text buffer in the shaders renderer
Commit: c8de8f4d52f021a1d7aec5a602b4364233fb6937
https://github.com/scummvm/scummvm/commit/c8de8f4d52f021a1d7aec5a602b4364233fb6937
Author: Joel Teichroeb (joel at teichroeb.net)
Date: 2026-11-11T16:06:47-05:00
Commit Message:
GRIM: Measure blank text objects as one line tall
A text object of only spaces, or of nothing, has no lines once the
trailing spaces are trimmed, and was measured as 0 pixels tall. The
original Grim and EMI both measure at least one line. The dialog log
turns each blank line into " " and adds up the heights to lay out the
page; with 0 it walked past the lines it had loaded and failed with
"indexed expression not a table" while scrolling.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/grim/textobject.cpp
diff --git a/engines/grim/textobject.cpp b/engines/grim/textobject.cpp
index 0ca4052ae4b..bb2ce6d9e8b 100644
--- a/engines/grim/textobject.cpp
+++ b/engines/grim/textobject.cpp
@@ -144,7 +144,7 @@ int TextObject::getBitmapWidth() const {
}
int TextObject::getBitmapHeight() const {
- return _numberLines * _font->getKernedHeight();
+ return MAX(_numberLines, 1) * _font->getKernedHeight();
}
int TextObject::getTextCharPosition(int pos) {
Commit: bcf9bf753d6d61ae2c2576257272da0f624c4776
https://github.com/scummvm/scummvm/commit/bcf9bf753d6d61ae2c2576257272da0f624c4776
Author: Joel Teichroeb (joel at teichroeb.net)
Date: 2026-11-11T16:07:54-05:00
Commit Message:
GRIM: Grow the blast text buffer in the shaders renderer
The vertex buffer for the blasted texts had room for 128 characters.
For a longer text glBufferSubData failed, and the draw showed the
glyphs the earlier texts had left in the buffer, which garbled the
dialog log. Grow the buffer when a text needs more room.
Fix #13125
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/grim/gfx_opengl_shaders.cpp
engines/grim/gfx_opengl_shaders.h
diff --git a/engines/grim/gfx_opengl_shaders.cpp b/engines/grim/gfx_opengl_shaders.cpp
index f3435300c49..4cdd389f82d 100644
--- a/engines/grim/gfx_opengl_shaders.cpp
+++ b/engines/grim/gfx_opengl_shaders.cpp
@@ -212,6 +212,8 @@ GfxOpenGLS::GfxOpenGLS() {
_backgroundProgram = nullptr;
_smushProgram = nullptr;
_textProgram = nullptr;
+ _blastVBO = 0;
+ _blastVBOCapacity = 0;
_emergProgram = nullptr;
_actorProgram = nullptr;
_actorLightsProgram = nullptr;
@@ -396,7 +398,8 @@ void GfxOpenGLS::setupShaders() {
setupPrimitives();
if (!isEMI) {
- _blastVBO = OpenGL::Shader::createBuffer(GL_ARRAY_BUFFER, 128 * 16 * sizeof(float), nullptr, GL_DYNAMIC_DRAW);
+ _blastVBOCapacity = 128;
+ _blastVBO = OpenGL::Shader::createBuffer(GL_ARRAY_BUFFER, _blastVBOCapacity * 16 * sizeof(float), nullptr, GL_DYNAMIC_DRAW);
}
}
@@ -1751,6 +1754,10 @@ void GfxOpenGLS::createTextObject(TextObject *text) {
if (text->isBlastDraw()) {
vbo = _blastVBO;
glBindBuffer(GL_ARRAY_BUFFER, vbo);
+ if (numCharacters > _blastVBOCapacity) {
+ _blastVBOCapacity = numCharacters;
+ glBufferData(GL_ARRAY_BUFFER, _blastVBOCapacity * 16 * sizeof(float), nullptr, GL_DYNAMIC_DRAW);
+ }
glBufferSubData(GL_ARRAY_BUFFER, 0, numCharacters * 16 * sizeof(float), bufData);
} else {
vbo = OpenGL::Shader::createBuffer(GL_ARRAY_BUFFER, numCharacters * 16 * sizeof(float), bufData, GL_STATIC_DRAW);
diff --git a/engines/grim/gfx_opengl_shaders.h b/engines/grim/gfx_opengl_shaders.h
index d17cb74ff5b..3fd94156aa5 100644
--- a/engines/grim/gfx_opengl_shaders.h
+++ b/engines/grim/gfx_opengl_shaders.h
@@ -285,6 +285,7 @@ private:
GLuint _dimVBO;
GLuint _dimRegionVBO;
GLuint _blastVBO;
+ int _blastVBOCapacity;
GLuint _storedDisplay;
};
More information about the Scummvm-git-logs
mailing list