matrix values cpu side

This commit is contained in:
2025-11-09 12:13:08 +01:00
parent 6a874a01bb
commit 1be8e337a3
2 changed files with 31 additions and 14 deletions

View File

@@ -140,6 +140,31 @@ int main() {
glBindVertexArray(vertexArray);
std::vector<glm::mat4> transformations = {
{
0.5f, 0.0f, 0.0f, 0.0f,
0.0f, 0.5f, 0.0f, 0.36f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f,
},
{
0.5f, 0.0f, 0.0f, -0.5f,
0.0f, 0.5f, 0.0f, -0.5f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f,
},
{
0.5f, 0.0f, 0.0f, 0.5f,
0.0f, 0.5f, 0.0f, -0.5f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f,
},
};
glUseProgram(s_ComputeShader);
glUniformMatrix4fv(1, transformations.size(), true, glm::value_ptr(transformations[0]));
while (!glfwWindowShouldClose(window)) {
// ScopedTimer timer("Main Loop");