Seting up Perspective projections using GLM in Open GL es
I have problem setting up Perspective matrix in OpenGL ES
I use GLM math lib for perspective projection matrix creation and pass the
matrix to vertex shader.
code created matrix is given as
glm::mat4(glm::perspective(45.0f, 1.0f, 1.0f, 200.0f))
and shader processes vertex using simple code
gl_Position = projection * scale * translate * vPosition;
but the result seems my object was cut off by viewing volume by "far side"
The matrix data created for projection matrix is
2.41421, 0, 0, 0
0, 2.41421, 0, 0
0, 0, -1.10526, -1
0, 0, -2.10526, 0
Thanks
No comments:
Post a Comment