Commit 0d6d184e authored by Sadman Kazi's avatar Sadman Kazi 🎸

Suzanne now loads!

parent 65899f33
......@@ -37,6 +37,8 @@ Game::Game()
mesh = new Mesh("./res/monkeyNoUV.obj");
transform = new Transform();
transform->SetScale(glm::vec3(0.5f, 0.5f, 0.5f));
shader->addUniform("transform");
counter = 0;
}
......@@ -72,12 +74,12 @@ void Game::render() {
void Game::update() {
counter += Time::getDelta();
//std::cout << counter << std::endl;
float sinCounter = sinf(counter);
float sinCounter = counter;
float absSinCounter = abs(sinCounter);
transform->GetPos().x = sinCounter;
//transform->GetPos().x = sinCounter;
transform->GetRot().y = sinCounter;
transform->GetRot().z = sinCounter;
//transform->GetRot().z = sinCounter;
shader->setUniformMat4("transform", transform->GetModel());
}
\ No newline at end of file
......@@ -7,6 +7,6 @@ out vec4 color;
uniform mat4 transform;
void main () {
gl_Position = transform * vec4(1.5*position, 1.0);
gl_Position = transform * vec4(position, 1.0);
color = clamp(gl_Position, 0.0, 1.0);
}
Markdown is supported
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