Skip to content

Commit 7e75975

Browse files
committed
throwing crap at the wall see what sticks (mac model fixes)
1 parent ed2df2c commit 7e75975

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LuaSTG/Core/Graphics/Model_OpenGL.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ namespace Core::Graphics
113113
assert(false);
114114
return false;
115115
}
116+
glBindBuffer(GL_UNIFORM_BUFFER, ubo_mlw);
117+
glBufferData(GL_UNIFORM_BUFFER, 128, 0, GL_DYNAMIC_DRAW);
118+
116119

117120
// built-in: camera info
118121

@@ -805,7 +808,7 @@ namespace Core::Graphics
805808
v.v1 = t_total_;
806809
v.v2 = glm::inverseTranspose(t_total_);
807810
glBindBuffer(GL_UNIFORM_BUFFER, shared_->ubo_mlw);
808-
glBufferData(GL_UNIFORM_BUFFER, sizeof(v), &v, GL_STATIC_DRAW);
811+
glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(v), &v);
809812
};
810813
auto set_state_from_block = [&](ModelBlock& mblock)
811814
{

0 commit comments

Comments
 (0)