Hello,
I'm trying to a render a simple model using a wrapper of OpenGL that I'm creating. I'm following multiple tutorials while attempting to make my rendering pipeline, naimly http://ogldev.atspace.co.uk/ and http://www.opengl-tutorial.org/. When I render my triangle given the coordinates (-1.0f, -1.0f, 0.0f), (1.0f, -1.0f, 0.0f),( 0.0f, 1.0f, 0.0f) under orthogonal projection the model appears as expected. I can also translate it using the Orientation class I made. But once I use glm::perspective and multiply it by the orientation matrix, the model never displays. I tried the same parameters as the tutorials have but the object just disappears and I can't figure out why.
My parameters for glm perspective are FOV = 45.0f, Aspect Ratio = 640.0f / 480.0f, Near = 1.0f, Far = 100.0f. I set the object to be scaled by 1 (keeps original size) and I tried putting the object in positive and negative 3 in the z direction, both of which didn't display. For doing orientation, I use glm's translate, rotate and scale functions. The WVP matrix I was sending (minus the view) became:
0.0 2.414213 0.0 0.0
0.0 0.0 -7.080808 -1
0.0 0.0 -2.020202 0.0
1.810660 0.0 0.0 0.0
The vertex shader simply takes this value and multiplies it by the position and the fragment shader colors the triangle red.