Skip to content

Commit fe0825b

Browse files
committed
fix buffer limits
1 parent e106b09 commit fe0825b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/libraries/lwjgl/src/processing/lwjgl/PLWJGL.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,19 +1240,19 @@ public void uniform1iv(int location, int count, IntBuffer v) {
12401240
}
12411241

12421242
public void uniform2iv(int location, int count, IntBuffer v) {
1243-
v.limit(count);
1243+
v.limit(2 * count);
12441244
GL20.glUniform2(location, v);
12451245
v.clear();
12461246
}
12471247

12481248
public void uniform3iv(int location, int count, IntBuffer v) {
1249-
v.limit(count);
1249+
v.limit(3 * count);
12501250
GL20.glUniform3(location, v);
12511251
v.clear();
12521252
}
12531253

12541254
public void uniform4iv(int location, int count, IntBuffer v) {
1255-
v.limit(count);
1255+
v.limit(4 * count);
12561256
GL20.glUniform4(location, v);
12571257
v.clear();
12581258
}
@@ -1264,19 +1264,19 @@ public void uniform1fv(int location, int count, FloatBuffer v) {
12641264
}
12651265

12661266
public void uniform2fv(int location, int count, FloatBuffer v) {
1267-
v.limit(count);
1267+
v.limit(2 * count);
12681268
GL20.glUniform2(location, v);
12691269
v.clear();
12701270
}
12711271

12721272
public void uniform3fv(int location, int count, FloatBuffer v) {
1273-
v.limit(count);
1273+
v.limit(3 * count);
12741274
GL20.glUniform3(location, v);
12751275
v.clear();
12761276
}
12771277

12781278
public void uniform4fv(int location, int count, FloatBuffer v) {
1279-
v.limit(count);
1279+
v.limit(4 * count);
12801280
GL20.glUniform4(location, v);
12811281
v.clear();
12821282
}

0 commit comments

Comments
 (0)