C
C
cats722017-09-03 12:11:25
C++ / C#
cats72, 2017-09-03 12:11:25

How does gluPerspective in OpenGL form a coordinate system?

Good afternoon! Explain to a beginner in OpenGL the following, if I set for example glOrtho(-100,100,-100,100,-100,100) then the coordinate system is from -100 to 100 in all axes. But I can't figure out how the coordinate system is obtained with gluPerspective? For example gluPerspective(60.0f, (GLfloat)(800/600), 1.0, 400.0), am I correct in x and y from -133 to 133, and in z from -200 to 200?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Stolyarov, 2017-09-03
@Ni55aN

gluPerspective(60.0f, (GLfloat)(800/600), 1.0, 400.0

Everything inside the truncated pyramid from 1 to 400 in the direction of the camera will be included in the frame (if we take world coordinates, and there are both model and view matrix)
aEwwS.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question