From 50462167289384ba8c546331a71d8d8558f06c80 Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Wed, 1 Mar 2017 10:51:50 -0500 Subject: changed the elevation texture and switched the diffuse/reflect value positions --- glgfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'glgfx.cpp') diff --git a/glgfx.cpp b/glgfx.cpp index bed50d4..7b54254 100644 --- a/glgfx.cpp +++ b/glgfx.cpp @@ -243,7 +243,7 @@ int setlight (float x, float y, float z) { } //draws the model, setting perspective transform and position transform //done with magic numbers for now for testing purposes -int drawmodel(float x, float y, float z, float xr, float yr, float zr) { +int drawmodel(float x, float y, float z, float xr, float yr, float zr, float s) { // the transformation matrix = rotation matrix of object * scaling matrix * translaton matrix representing difference in camera and object location * -rotation matrix of the camera * perspective transform //order of application ir right to left //fov, aspect ratio, size of near and far planes distance @@ -259,12 +259,12 @@ int drawmodel(float x, float y, float z, float xr, float yr, float zr) { //); //the translation matrix, matrixes added last are applied first glm::mat4 tran; + tran = glm::scale(tran, glm::vec3(s,s,s)); tran = glm::translate(tran, glm::vec3(x,y,z)); tran = glm::rotate(tran,glm::radians(xr),glm::vec3(1,0,0)); // axis of rotation x y z tran = glm::rotate(tran,glm::radians(yr),glm::vec3(0,1,0)); tran = glm::rotate(tran,glm::radians(zr),glm::vec3(0,0,1)); glm::mat4 rot; - tran = glm::translate(tran, glm::vec3(0,0,0)); rot = glm::rotate(rot,glm::radians(xr),glm::vec3(1,0,0)); // axis of rotation x y z rot = glm::rotate(rot,glm::radians(yr),glm::vec3(0,1,0)); rot = glm::rotate(rot,glm::radians(zr),glm::vec3(0,0,1)); -- cgit v1.1