Skip to content

Commit

Permalink
GL3Plus: GLSLShader - need padding when using UBOs
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Sep 8, 2024
1 parent 194a775 commit 584bb36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RenderSystems/GL3Plus/src/GLSL/src/OgreGLSLShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ namespace Ogre {
// increment physical buffer location

convertGLUniformtoOgreType(values[1], def);
// GL doesn't pad
def.elementSize = GpuConstantDefinition::getElementSize(def.constType, false);
bool doPadding = block > -1;
def.elementSize = GpuConstantDefinition::getElementSize(def.constType, doPadding);

// also allow index based referencing
GpuLogicalIndexUse use;
Expand Down

0 comments on commit 584bb36

Please sign in to comment.