Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm reading about projection matrix. Needs of perspective projection is obvious, but I'm not sure about orthogonal projection. Because orthogonal projection effect looks possible with only world transform.

What is main purpose of orthogonal project which make it different with world transform?

share|improve this question
2  
Take a look at: link. Scroll down for 'Display projections'. –  Edin M. Oct 4 '12 at 8:20
    
Can I assume OpenGL performs some projection by default? –  Eonil Oct 4 '12 at 9:01
1  
"Can I assume OpenGL performs some projection by default?" - yes. The default projection matrix is identity (as is the default modelview) which essentially equates to ortho in the [-1..1] range on both x and y axes. GL itself doesn't have any concept of "projection" - that's just a mathematical construct derived from MVP * position, but MVP can be any matrix and doesn't need to include any kind of projection. –  Jimmy Shelter Oct 4 '12 at 10:36
add comment

1 Answer 1

up vote 1 down vote accepted

It is possible to skip the orthogonal projection entirely, you are correct. It is usefull however, since most of the time when doing 2D you want to be working with screen space coordinates and not the (-1,1) range. It's more intuitive and hides the implementation details from the user.

All OpenGL does is, it expects your vertex shader to output clip space coordinates so it can do the perspective divide. So if you leave the w coordinate as 1 then it's like OpenGL did nothing. OpenGL will certainly not perform any transformations unless you tell it to.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.