Okay. The simple mistake in my understanding was that when using orthographic projection altering the Z coordinate does not change the size of the object whereas perspective projection does. :doh:
Type: Posts; User: devonM
Okay. The simple mistake in my understanding was that when using orthographic projection altering the Z coordinate does not change the size of the object whereas perspective projection does. :doh:
Let me verify something more basic. Given these two sets of vectors:
{-0.2f, 0.5f, -10.0f},
{0.3f, -0.5f, -10.0f},
{0.8f, 0.5f, -10.0f}
{-0.2f, 0.5f, -2.0f},
Thanks Aleksander,
I changed the code to the following but it made no difference:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable (GL_DEPTH_TEST);
...
Ok, I am a little confused on how to use z coordinates. The following code does not display a yellow triangle. When I remove the glOrtho call and change the z coordinates of the vertices back to...
Thank you very much! I can't believe I overlooked that. Changing the indices to GLushort corrected the problem.
Greetings. First time posting here. I'm fairly new with OpenGL and am having a devil of a time trying to get glDrawElements to work. I am using 3.2 Core to attempt to draw a simple multicolored...