OpenGL ES/ Objective-C Game Tutorial part 4: Projection matrix

preview_player
Показать описание
In this tutorial series we will try to make a game from scratch for IOS with OpenGL
ES and Objective-C.
Рекомендации по теме
Комментарии
Автор

The projection matrix here is for a iPhone 5 screen, it may not work as expected on other iPhones. In that case change the arguments of the GLKMatrix4MakeOrtho funtion to match your device's dimensions.

InitWithData
Автор

Oh, thank you for pointing that out :)

InitWithData
Автор

Hi, great series. Thank you for this.
I'd like to point out an error which i don't understand why your code works but maybe you cuted it out by mistake in post.
At 2:50, nearZ and farZ do matter. They cannot be "0, 0" because that would mean that you cut of everything. Since you are in Ortho i suggest you set them to "-1, 1" so the objects on "0" would be visible.

vedran
Автор

Instead of 0, 0 for Z -1 and 1 works for phycal  Device also (not only simulator)

prathapmalempati
Автор

My project only works on a simulator not a device?

ewanbains
Автор

For some reason, this part is working for me in the simulator but not on the device - any thoughts?

andrewkohan
join shbcf.ru