Commit 5b2a993a authored by Philip Trettner's avatar Philip Trettner
Browse files

updates subs, incorporated arrayview fix

parent a127ef64
glow @ 9c1af318
Subproject commit 79f278f3a41b551daa20fe45a8a9cb5b5926ff0d
Subproject commit 9c1af3181393c906be46c3ef9cb8126c13f0d07c
glow-extras @ 10b1b9af
Subproject commit b2b528eb65352c877ef76665d67ce5d045e40a7d
Subproject commit 10b1b9af7baf058208cb17255cac7e2148e063ba
polymesh @ 85f96d09
Subproject commit 62677179123a61649755b05e86a8ed68adee81e9
Subproject commit 85f96d0979105611335c21b6ec2904d5c80458c8
typed-geometry @ 93b0bedb
Subproject commit 5667d301be090fe5e175714cc6497c096f9189b5
Subproject commit 93b0bedbac60264a539c5d116c60769baeeb4638
......@@ -33,6 +33,8 @@ TEST_CASE("glow uniform interface")
uniform float uFloatCArray[4];
uniform vec3 uDir3;
uniform vec4 uColor4;
uniform mat4 uTransforms[3];
uniform float uFloats[4];
void main()
{
......@@ -73,6 +75,8 @@ TEST_CASE("glow uniform interface")
data[i++] = uFloatCArray[3];
data[i++] = uDir3[0];
data[i++] = uColor4[0];
data[i++] = uTransforms[0];
data[i++] = uFloats[2];
}
)");
auto prog = glow::Program::create(csh);
......@@ -95,6 +99,10 @@ TEST_CASE("glow uniform interface")
auto mat4 = glm::lookAt(glm::vec3{5, 6, 7}, glm::vec3{2, 3, 4}, glm::vec3{0, 1, 0});
auto mat3s = std::vector{randomMat3(), randomMat3()};
tg::array<tg::mat4, 3> transforms;
transforms[0] = tg::mat4::identity;
float floats[4] = {4, 5, 6, 7};
// launch compute shader
{
auto shader = prog->use();
......@@ -127,6 +135,9 @@ TEST_CASE("glow uniform interface")
shader["uColor4"] = tg::color4::red;
shader["uTransforms"] = transforms;
shader["uFloats"] = floats;
shader.compute(1);
}
......@@ -183,5 +194,9 @@ TEST_CASE("glow uniform interface")
CHECK(data[i++] == 1);
// uColor4
CHECK(data[i++] == 1);
// uTransforms[0][0]
CHECK(data[i++] == 1);
// uFloats[2]
CHECK(data[i++] == 6);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment