Skip to content

Commit

Permalink
HACK: Apply the same workaround for glColor4ub (#18)
Browse files Browse the repository at this point in the history
See #17

Found out that Botania is using 4ub variant, we need to patch it too.
  • Loading branch information
pftbest authored Feb 17, 2023
1 parent 8c59710 commit a9ca07a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/generated/java/org/lwjglx/opengl/GL11.java
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,11 @@ public static void glColor4f(float red, float green, float blue, float alpha) {
}

public static void glColor4ub(byte red, byte green, byte blue, byte alpha) {
org.lwjgl.opengl.GL11.glColor4ub(red, green, blue, alpha);
org.lwjgl.opengl.GL11.glColor4i(
(red & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO,
(green & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO,
(blue & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO,
(alpha & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO);
}

public static void glColorMask(boolean red, boolean green, boolean blue, boolean alpha) {
Expand Down

0 comments on commit a9ca07a

Please sign in to comment.