OpenGL ES 2.0 Programming Guide

Category: Programming
Author: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
3.7
All Stack Overflow 14
This Year Stack Overflow 2
This Month Stack Overflow 3

Comments

by anonymous   2019-07-21

I found roughly the same to begin with. A lot of the online reads didn't explain in as much detail as I would have liked. Combined with the different versions of OpenGL and GLSL I had a few wtf moments.

However my most recent purchase was the OpenGL ES 2.0 Programming Guide (ISBN-10: 0321502795, ISBN-13: 978-0321502797). It focuses on ES 2.0 which I think is a good starting point to the GLSL. I haven't actually tried any of the exercises yet as I prefer to read first and then go back through and experiment. However I'm ~100 pages in so far and everything has been brilliantly explained and in a sensible order for a new-comer.

If you combine this book with Essential Mathematics for Games and Interactive Applications: A Programmer's Guide (ISBN-10: 0123742978, ISBN-13: 978-0123742971) then that should be plenty to get going with.

by anonymous   2019-07-21

2D programming is just 3D programming that's constrained to a plane. You'll have no choice but to learn 3D, but when you're using it just set z = 0.

There is an offical book on OpenGL ES. That might give you the intro that you're after: http://www.amazon.com/OpenGL-ES-2-0-Programming-Guide/dp/0321502795/

by anonymous   2019-07-21

I had a play around with OpenGL ES a year or so ago, and I found this on-line O'Reilly book very helpful: http://ofps.oreilly.com/titles/9780596804824/

The chapters are typical of most books on this subject; math primer to 'Advanced' (typically your usual scene using shaders that implement cube-maps, bump-maps etc)

You are also able to download the source code for the examples.

Edit: I also own this book http://www.amazon.co.uk/OpenGL-ES-2-0-Programming-Guide/dp/0321502795/ref=sr_1_1?ie=UTF8&qid=1336064164&sr=8-1 Which I found was a good read with respect to OpenGL ES as-well as 3D graphics in general.

by anonymous   2017-08-20

This is a hard question, what you want is a 2D Graphics or Game engine that uses OpenGL ES 2.0. I don't know any, but i will give you the tools you need.

You should get the book OpenGL ES 2.0 Programming Guide, it contains everything about OpenGL ES 2.0. You will have to use shaders since ES 2.0 doesn't contain any fixed function pipeline. That book contains basic shaders you can use.

This other question here contains tutorials and sample code for OpenGL ES 2.0

This should be enough for you to learn how to draw more complex primitives as circles and lines.

To draw pixels on the screen, use a 2D texture. Painting pixel-by-pixel is going to be very slow.

I hope this helps you. Remember, OpenGL ES 2.0 is very different to OpenGL ES 1.1 and OpenGL!

by anonymous   2017-08-20

Check out the OES_depth_texture extension. With this you can

// generate and bind a new Framebuffer object
glGenFramebuffers( ... );
glBindFramebuffer( ... );

// create a depth texture
glTexImage2D(...,  GL_DEPTH_COMPONENT, ...);

// and attach it to the Framebuffer with     
glFramebufferTexture2D(..., GL_DEPTH_ATTACHMENT, ...);

Without OpenGL extensions there is no perfect solution. You can write depth values into the color buffer, but you will have limited precision there.

This SO thread covers the same question for WebGL which suffers from the same problem.
The GLES2 book covers Framebuffer Objects and Renderbuffer Objects, including extensions, in chapter 12.

by anonymous   2017-08-20

You haven't said how experienced you are with OpenGL and/or Android in general, but I'll assume that you are familiar with the basics.

In that case, the two books in this series both have significant coverage of OpenGL, which you can see by looking inside at their table of contents:

Those, together with a reference book on standard OpenGL ES 2.0 should be all you need for a long, long time.

by anonymous   2017-08-20

The Solution to this Particular Issue:

So, I added this line to my fragment shader:

precision mediump float;

to give us:

Fragment Shader

precision mediump float;

uniform vec4 vColor;

void main() {
    gl_FragColor = vColor;
}

Why this worked, I'm embarrassed to say that I do not know. If anybody is willing to elaborate further, please do I am curious. I'm still learning OpenGL ES 2.0. In my reading of OpenGL ES 2.0 Programming Guide (Good Book), I came across that line. And they noted, "In OpenGL ES 2.0, nothing can be drawn unless a valid vertex and fragment shader have been loaded." The Android tutorial also included this line, so I know it's critical.