EmJayJay

02-03-2015, 04:21 AM

I vaguely remember something about to not render triangles which are too big because there will be problems but I'm not sure about it.

And I seem to have fallen into that pit. I have defined a plane which I will scale and translate (in that order) and both work properly as far as I see it. But when I increase the scaling from 10 to 100 the triangles are not rendered. They shouldn't have moved anywhere else besides the translated distance. The matrix I use is like this

glm::mat4 modelM(1.0f);

modelM = glm::scale(modelM, glm::vec3(100.0f,0.0f,100.0f));

modelM = glm::translate(modelM, glm::vec3(0.0f,-5.0f, 0.0f));

Nothing special there and the plane is defined to be along X and Z plane while Y is 0.

EDIT: Good news. The scaled triangles started to appear with the color intended. Bad news is that the translations decided to go haywire ie. not working/having affect at all. Need to backtrack a bit to see where is the problem. Translation problems started after modifying their values.

EDIT2:

glm::mat4 modelM(1.0f);

modelM = glm::scale(modelM, glm::vec3(100.0f,0.0f,100.0f));

modelM = glm::translate(modelM, glm::vec3(0.0f,-5.0f, 0.0f));

glm::scale(modelM, glm::vec3(100.0f,0.0f,100.0f)) 1.0f

Bad bad bad bad bad me. (Or a bit dumb). Still don't know why originally the scaled drawing didn't work.

And I seem to have fallen into that pit. I have defined a plane which I will scale and translate (in that order) and both work properly as far as I see it. But when I increase the scaling from 10 to 100 the triangles are not rendered. They shouldn't have moved anywhere else besides the translated distance. The matrix I use is like this

glm::mat4 modelM(1.0f);

modelM = glm::scale(modelM, glm::vec3(100.0f,0.0f,100.0f));

modelM = glm::translate(modelM, glm::vec3(0.0f,-5.0f, 0.0f));

Nothing special there and the plane is defined to be along X and Z plane while Y is 0.

EDIT: Good news. The scaled triangles started to appear with the color intended. Bad news is that the translations decided to go haywire ie. not working/having affect at all. Need to backtrack a bit to see where is the problem. Translation problems started after modifying their values.

EDIT2:

glm::mat4 modelM(1.0f);

modelM = glm::scale(modelM, glm::vec3(100.0f,0.0f,100.0f));

modelM = glm::translate(modelM, glm::vec3(0.0f,-5.0f, 0.0f));

glm::scale(modelM, glm::vec3(100.0f,0.0f,100.0f)) 1.0f

Bad bad bad bad bad me. (Or a bit dumb). Still don't know why originally the scaled drawing didn't work.