Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17925

Major confusion with Ortho projection matrix and Z Near / Z Far values

$
0
0

I'm getting back into OpenGL graphics programming and I'm having trouble with projection matrices when it comes to the z near and z far values. They don't work how I thought they would, so I think I'm doing something wrong.

Starting off simple I have a default out of the box OpenGL 3.3 context. I am drawing a red square using a vertex buffer / index buffer and I am passing a single matrix setup as a orthographic projection to my shaders that acts as the MVP matrix.

The red square does show on the screen …


Viewing all articles
Browse latest Browse all 17925

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>