Reddit Reddit reviews OpenGL ES 2.0 Programming Guide

We found 7 Reddit comments about OpenGL ES 2.0 Programming Guide. Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Computer Graphics & Design
OpenGL ES 2.0 Programming Guide
Check price on Amazon

7 Reddit comments about OpenGL ES 2.0 Programming Guide:

u/H3g3m0n · 22 pointsr/learnprogramming

Recently OpenGL has been updated and unfortunately the non-shader stuff is now all deprecated which will be quite a bit of what you learned (but having that understanding is useful). OpenGL is split into the 'core profile' and the 'compatibility profile'. The OpenGL Core Profile, OpenGL ES and WebGL all use the same methods so learning any of them should give you a firm grounding in the others.

So it might be worth while having a crack at learning some of the 'modern' OpenGL 3.x/4.x core profile techniques. That will include shaders.

Most of the new stuff drastically reduces what OpenGL itself is responsible for. It becomes more of a glue layer to bridge between your programs and the video card drivers/hardware. As such the programmer is responsible for just about everything and has more work but the end result is much more efficient and flexible.

The old stuff is known as the 'fixed function pipeline' as OpenGL is responsible for defining a fixed ruleset as to how a vertex is turned into pixels on the screen including translations, lighting and so on. The new way is the 'programmable rendering pipeline' which just gives you the glue functions and leaves it up to you to write the code to turn vertex data into pixels on the screen.

Trying to learn how to do a complete core profile application all at once can be a bit much since there are many different areas that need to be simultaneously integrated and a failure in any one can just leave you with a black screen and no clue what's broken, so it's generally a good idea to split it up into a few different components and learn 1 bit at a time and build up from compatibility profile into the core profile.

Rather than give specific resources ill give you an overall battle plan and what stuff is called so you can google it and find all the resources.

The main problem with the outline is it sounds like your course is learning the 'old' way even when it comes to the shaders.

Matrices

If you understand transform matrices, modify your code to stop using the OpenGL matrix functions (glPushMatrix, glPopMatrix, glRotate, glTranslate, glScale, glFrustrum, gluPerspective, glLoadIdentity, glMatrixMode, glOrthagonal, gluLookAt). All the matrix operations have been deprecated in the OpenGL Core Profile. There are 2 ways to do this. Either you will need to write your own matrix functions for the above which can be a handy learning experience but time consuming and really requiring an indepth understanding of the matrix stuff. Or alternatively you can look at using the GLM library (it's part of the recommended libraries in the OpenGL SDK (which is just a collection of recommended practices rather than a real SDK but it's about as close to 'official' as you will get), it is a C++ library so if your programming in something else you might have to look around for something similar). At this point you will need to load your resulting matrices with glLoadMatrix, this function is also deprecated but it's worth using at this stage. Later on you will learn how to 'bind' your matrices with your shader programs.

VBOs

Secondly learn 'Vertex Buffer Objects'. The old way of doing things was to use (glBegin, glEnd, glVertex, glNormal, glColor, glTexCoord, glMultiTexCoord which are now all deprecated). That way involves pushing vertices and their attributes one at a time which is very slow. The new way involves putting all that data into an array and 'uploading' it to the video card's internal memory then just calling a function to draw it all at once.

Vertex buffer objects are part of both the 'old' way and the 'new' way. The difference is how they are implemented.

In the old way you set a special vertex pointer that informs OpenGL you want to mark that memory as vertex data, and other dedicated pointers for normals, color, texcoords and so on. Then your shaders in GLSL have special, dedicated variable names to access that data (gl_Vertex, gl_Normal) If you are doing VBO's befoure you have written your own shaders you will probably need to do it this way. Those functions are glEnableClientState(GL_VERTEX_ARRAY), glVertexPointer (..) and so on.

With the new way you use what are called Vertex Attributes. Basically OpenGL treats all your vertex data as raw data rather than giving it any special significance. It doesn't care if you have vertex positions, colours, texture coordinates, lighting normals. You can even make your own nonstandard stuff like temperature which you could use for doing infrared or velocity to handle some kind of pervertex speed distortion. You then 'bind' this data to your shader program and
you* give it the significance.

Shaders
Shaders are really several topics.

  • OpenGL's shader API. How you load, link and compile shaders and how you bind data to the shaders variables. Also how you can pull up log information to see why it didn't compile.
  • GLSL The languages itself, not too complex since it's like C/C++.
  • Algorithms This is the complicated mathematical stuff. To begin what you will want to learn is how you calculate basic shading. There are different shading algorithms. Lambert, Blinn, Phong, Blinn-Phong, Gouraud. They can be done either pervertex (this looks splotchy or 'starry' unless you have really large numbers of polygons on your meshes) or perpixel (better quality and most modern hardware is fast enough to handle it). The fixed function pipeline uses Gouraud shading pervertex when glShadeModel(GL_SMOOTH) is enabled if you just want to emulate that. I recommend you look at Blinn perpixel.

    Once you are doing shaders you can start binding Vertex Attributes rather than using the fixed specialized VertexAttribPointers.

    Basic texturing is really dead easy and will be done in the shaders. All you are doing it basically giving coordinates to map a triangle to a 1.0 x 1.0 square. Then you pick the color at that point and multiply it by the shading color.

    The main problem with shaders is they are too flexible. There is no standardized way to do anything. For your lighting do you just want 1 or 2 basic fixed lights that might just have a position, or do you want an array of structs for multiple complex lights. Do you want 1 basic flat image texture, or do you want a a few image textures, a normal map texture (for bump mapping), another one for self illumination.

    Then there is the really complex stuff. Bloom, HDR lighting, Ambient occlusion, various antialiasing techniques (MSAA, FSAA, etc...), parallax occlusion mapping, various shadow techniques, multipass rendering, deferred rendering. Techniques for order independent transparency (so you don't have to render transparenct polygons in a specific order). I don't recommend you try any of that stuff but do google the descriptions of what they are.


    Books

    Buy a book or 2. (or download them if your cheap).

    To be honest I haven't really read most of these books, just flipped though them and tend to google for the specific topic I want. But they are recommended often enough and I would like to get around to actually reading them properly.

  • The OpenGL Programming Guide - Also known as 'The Red Book'. This is the modern version of the 'guide' you had listed above, updated for newer versions of OpenGL. It's normally the goto learning OpenGL book. But I actually advice you to avoid it at this stage. Basically while the latest 7th edition has been updated for the new versions of OpenGL it's only very superficially covered and the tutorials all use compatibility profile stuff they just point out that it's deprecated. There is a new 8th edition coming in May 2012 that is supposed to cover the new stuff better. With that said the 7th should still do for things like shaders without problems. It's somewhat harder that other learning resources.

  • OpenGL Shading Language - Also known as 'The Orange Book'. This teaches you GLSL and hopefully the shading algorithms. linky.

  • OpenGL ES 2.0 Programming Guide - You mentioned doing OpenGL ES. This should help you with normal OpenGL as OpenGL ES is the subset of OpenGL that removes the fixed function pipeline. link.

  • OpenGL SuperBible - 5th edition - This teaches the new core profile. It covers things like vertex buffer objects, shaders and so on. The main draw back is at the start it does it by including a set of helper crutch libraries but as you progress you learn to implement their functionality yourself. Linky.
u/michad24 · 2 pointsr/opengl

Almost all of what I know I learned from this book. When I was learning ES 2.0 there was pretty much no reference material on the subject as nobody used it.

Shaders are pretty simple, however they're a pain in the ass as you have to do everything yourself, which is both an advantage and disadvantage.

u/ttscc · 2 pointsr/androiddev

i would go with opengl es 2.0 rather than OpenGL ES 1.1 and for OpenGL ES 2.0 only this book available and it was really helpfull for me so i highly recommend it.

u/Shudderbird · 1 pointr/learnprogramming

I'd recommend learning OpenGL ES for the modern day sake of things - keeps it simple and to the point, only explaining things you need to know. I am reading this book currently and I cannot recommend it enough.

u/RonnieRaygun · 1 pointr/programming

You're absolutely right. I'm forced to admit that I don't have a good overview of the OpenGL books currently on the market, so I can't claim to know if any of them actually teach a modern usage of the API.

However: it should be noted that the OpenGL ES 2.0 spec does eliminate the old immedate-mode API. As such, an ES 2.0 programming book might fit the bill well.

Here's one

u/iw6 · 1 pointr/programming

actually, this book provides a glsl es 2.0 vertex shader that fully emulates the gl es 1.1 fixed pipeline.

u/[deleted] · 1 pointr/TwoXChromosomes

Fiction - A Clash of Kings, the second book in a Song of Ice and Fire.

Non-Fiction - Working Effectively with Legacy Code & OpenGL ES 2.0 Programming Guide. A Coder's gotta code.