mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-26 15:13:01 +00:00
Fix glLoadMatrix and add a test for it
Fixes https://github.com/GTNewHorizons/Angelica/issues/299
This commit is contained in:
1 parent
e40ee19ac8
commit
029da0e7fa
2 files changed
+17
-1
No files matched your search
@@ -2,6 +2,7 @@ package com.gtnewhorizons.angelica.glsm;
|
||||
|
||||
import com.gtnewhorizons.angelica.AngelicaExtension;
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Matrix4fStack;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
@@ -72,7 +73,7 @@ public class GLMS_MatrixStack_UnitTest {
|
||||
|
||||
GLStateManager.glPushMatrix();
|
||||
|
||||
Matrix4f testMatrix = new Matrix4f().identity();
|
||||
Matrix4fStack testMatrix = new Matrix4fStack(2);
|
||||
|
||||
validateMatrix(testMatrix, matrix.getEnum, "Identity " + matrix.name + " Matrix");
|
||||
|
||||
@@ -92,6 +93,14 @@ public class GLMS_MatrixStack_UnitTest {
|
||||
testMatrix.ortho(0, 800, 0, 600, -1, 1);
|
||||
validateMatrix(testMatrix, matrix.getEnum, "Ortho " + matrix.name + " Matrix");
|
||||
|
||||
Matrix4f testLoad = new Matrix4f();
|
||||
testLoad.m02(5f);
|
||||
testLoad.m12(12f);
|
||||
testLoad.get(buffer);
|
||||
|
||||
GLStateManager.glLoadMatrix(buffer);
|
||||
validateMatrix(testLoad, matrix.getEnum, "Loaded " + matrix.name + " Matrix");
|
||||
|
||||
GLStateManager.glPopMatrix();
|
||||
testMatrix.identity();
|
||||
validateMatrix(testMatrix, matrix.getEnum, "Popped " + matrix.name + " Matrix");
|
||||
|
||||
Reference in new issue
Block a user