Compare commits
No commits in common. "06e7e308ccd7a327528b9c1897c99419d2b4e81f" and "25087ea6b45b7b430926ceb7eb7fede563b149b8" have entirely different histories.
06e7e308cc
...
25087ea6b4
|
@ -37,7 +37,8 @@ void Quad::draw(GLFWwindow *w) {
|
|||
|
||||
glm::mat4 translate =
|
||||
glm::translate(glm::mat4(1.0f), glm::vec3(m_pos_x, m_pos_y, 0.0f));
|
||||
glm::mat4 rotate = glm::rotate(glm::mat4(1.0f), glm::radians(m_rotation),
|
||||
glm::mat4 rotate =
|
||||
glm::rotate(glm::mat4(1.0f), (float)glfwGetTime() * glm::radians(50.0f),
|
||||
glm::vec3(0.0f, 0.0f, 1.0f));
|
||||
glm::mat4 scale = glm::scale(glm::mat4(1.0f), glm::vec3(1.0f));
|
||||
glm::mat4 model = translate * rotate * scale;
|
||||
|
|
|
@ -117,13 +117,10 @@ static void init_opengl() {
|
|||
|
||||
init_shaders();
|
||||
|
||||
quads.push_back(new Quad(std::span<float>(verts), uniform_locations));
|
||||
quads.push_back(new Quad(std::span<float>(verts), uniform_locations));
|
||||
|
||||
quads[0]->m_pos_y = 40;
|
||||
quads[0]->m_pos_x = 40;
|
||||
quads[1]->m_pos_y = 40;
|
||||
quads[1]->m_pos_x = 400;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
Loading…
Reference in New Issue