Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to learn and use OpenGL ES 2.0? I just don't get it - serious Qn. [closed]

Tags:

This is a serious question, I am "stuck" at this point between understanding it and not at all. I got very confused with the time reading different resources and would like someone to point me in the right direction.

I am working with Android platform, until now I have used the Canvas, some OpenGL ES 1.0, but mostly through engines or already built code to try and understand it.

My goal is to ACTUALLY understand OpenGL ES 2.0. I do not want to go straight to the complicated stuff and start with easy stuff, but I just don't get how to do it. I can get a square, and I can set up a camera and matrices; to tell you the truth I really don't understand the whole matrix system and how it works, if I am right it was a fixed-function-pipeline which you didn't need to change in OpenGL ES 1.0 but now it's a programmable-pipeline which you have to set up on your own.

I do not get how to use the coordinate system, I know that the origin is the center of the device and each turn to the edge is 1, so from center to left it would be negative 1.

There were some ways however to make it into a different coordinate system, maybe just use proportions or multiply matrices to set the coordination to something that I was used to from the Canvas.

Basically what I need help with is how do I progress from here? I feel as if I got to somewhere, but I am still nowhere.

I really need some advises on how to properly use OpenGL ES 2.0, for now all I am planning on is a simple 2D game, maybe side scroll-er too so I will have to mess with the camera matrices.

Thank you for your time, I will greatly appreciate any help.

*I am less interested in the transformation matrices since I do not think that 2D game would really use that, maybe only when I mirror the character's sprite so it would look as if he is walking in a different direction, but I'm pretty sure this is possible to be made simple by changing the coordination and width.

like image 712
Baruch Avatar asked Apr 13 '13 02:04

Baruch


4 Answers

There is a lack of decent openGL ES 2.0 Android / Java specific tutorials out there, but they are out there somewhere.

Check this one out, should help you :-)

http://www.learnopengles.com/android-lesson-one-getting-started/

For making a 2d game with OGL, you will basically ignore the z axis and just work with x and y. It is confusing at first, but stick with it.

Good luck.

like image 52
Zippy Avatar answered Sep 21 '22 02:09

Zippy


You can use this book by Prateek Mehta. Everything is explained in very simple terms. Good for understanding basic OpenGL ES 2.0 and GLSL programming.

like image 35
Ikhurana Avatar answered Sep 23 '22 02:09

Ikhurana


I found this website off the Khronos Group website:

Khronos resources And some sample code you can download for android here

The Zeus website has 25 OpenGL ES 2.0 code, I think it's a copy like the glut tutorials, but for ES 2.0.

I hope this can simplify things, I'm trying to learn OpenGL ES 2.0, you may see many of my posts in the future on 2.0 (asking questions), just to let you know.

like image 3
jaysonpowers Avatar answered Sep 25 '22 02:09

jaysonpowers


I've found this extended online tutorial to be excellent, not only for the OpenGL specifics but for the underlying graphics concepts, which is of course the hard part. Very clear exposition of the different coordinate spaces you will typically be concerned with.

like image 2
4bar Avatar answered Sep 23 '22 02:09

4bar