Questions tagged [opengl-es-2.0]

Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones. This version 2.0 eliminates most of the fixed-function rendering pipeline in favor of a programmable one.

OpenGL for Embedded Systems (OpenGL ES) is a subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones, PDAs, and video game consoles. OpenGL ES is managed by the not-for-profit technology consortium, the Khronos Group, Inc.

OpenGL ES 2.0 was publicly released in March 2007. It eliminates most of the fixed-function rendering pipeline in favor of a programmable one. Almost all rendering features of the transform and lighting pipelines, such as the specification of materials and light parameters formerly specified by the fixed-function API, are replaced by shaders written by the graphics programmer. As a result, OpenGL ES 2.0 is not backwards compatible with OpenGL ES 1.1. Some incompatibilities between the desktop version of OpenGL and OpenGL ES 2.0 persisted until OpenGL 4.1, which added the GL_ARB_ES2_compatibility extension.

More details at http://en.wikipedia.org/wiki/OpenGL_ES#OpenGL_ES_2.0

Resources:

3921 questions
87
votes
3 answers

Explicit vs Automatic attribute location binding for OpenGL shaders

When setting up attribute locations for an OpenGL shader program, you are faced with two options: glBindAttribLocation() before linking to explicitly define an attribute location. or glGetAttribLocation() after linking to obtain an…
Jing
  • 1,881
  • 2
  • 15
  • 13
67
votes
2 answers

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

Is there any faster way to access the frame buffer than using glReadPixels? I would need read-only access to a small rectangular rendering area in the frame buffer to process the data further in CPU. Performance is important because I have to…
atisman
  • 1,187
  • 1
  • 11
  • 16
63
votes
1 answer

In OpenGL ES 2.0 / GLSL, where do you need precision specifiers?

Does the variable that you're stuffing values into dictate what precision you're working with, to the right of the equals sign? For example, is there any difference, of meaning, to the precision specifier here: gl_FragColor = lowp vec4(1); Here's…
user652038
56
votes
1 answer

OpenGL ES 2.0 Multiple Programs or Multiple Shaders or what? How does it work?

The Problem (TL;DR) My problem, fundamentally, is that I do not know how OpenGL ES 2.0 expects me to write and use multiple shaders; or if it is even advisable/expected that a person will do so. The fundamental question here is: if I have an apple,…
Robert Massaioli
  • 13,379
  • 7
  • 57
  • 73
56
votes
2 answers

How can I do these image processing tasks using OpenGL ES 2.0 shaders?

How can I perform the following image processing tasks using OpenGL ES 2.0 shaders? Colorspace transform ( RGB/YUV/HSL/Lab ) Swirling of the image Converting to a sketch Converting to an oil painting
Forrest
  • 122,703
  • 20
  • 73
  • 107
43
votes
2 answers

How to get a "Glow" shader effect in OpenGL ES 2.0?

I'm writing a 3D app for iOS. I'm new to OpenGL ES 2.0, so I'm still getting myself around writing basic shaders. I really need to implement a "Glow" effect on some of my models, based on the texturing. Here's a sample: . I'm looking for code…
st4wik
  • 476
  • 1
  • 4
  • 5
42
votes
1 answer

Modifying camera output using SurfaceTexture and OpenGL

I am trying to filter the stream coming from the camera hardware by running it through an openGL filter, then displaying it in a GLSurfaceView. When openGL goes to render the frame, the LogCat repeatedly spits out an error: [unnamed-3314-0]…
Dan Collins
  • 1,018
  • 1
  • 11
  • 20
37
votes
1 answer

Android freeze in OpenGL|ES (CPU may be pegged. trying again.)

A while ago I bumped into an issue with eglSwapBuffers freezing the phone with the following message showing up in the device log: W/SharedBufferStack( 1110): waitForCondition(LockCondition) timed out (identity=28, status=0). CPU may be pegged.…
35
votes
3 answers

What are the differences between OpenGL ES 2.0 and OpenGL ES 3.0

I want to know what is the differences between OpenGL ES 2.0 and OpenGL ES 3.0. What is the main advantage of OpenGL ES 3.0?
pushyu
  • 433
  • 1
  • 5
  • 6
34
votes
2 answers

Why not vec3 for OpenGL ES 2.0 gl_Position?

I am new to OpenGL ES 2.0, and cannot understand the following simplest shader: attribute vec4 vPosition; void main() { gl_Position = vPosition; } My question is, since a position would be a vector of (x, y, z), why is gl_Position a vec4 instead…
peter
  • 1,034
  • 1
  • 9
  • 23
33
votes
6 answers

Render multiple objects with OpenGL ES 2.0

I am trying to learn OpenGL ES 2.0 to do some iPhone game development. I have read through multiple tutorials and some of the OpenGL ES 2.0 spec. All of the examples I have seen have created a single mesh, loaded it into a vertex buffer and then…
user250818
32
votes
2 answers

Differences between GLSL and GLSL ES 2

Two questions really... Is GLSL ES 2 a totally separate language, or a special version of GLSL? What are the differences between them, in terms of "standard library" functions, syntax and capabilities? I am writing shaders for an application…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
31
votes
5 answers

GLKView set drawable properties

I'm trying to port Apples GLPaint example to use GLKit. Using a UIView, its possible to return the CAEAGLLayer of the view and set the drawableProperties to include kEAGLDrawablePropertyRetainedBacking. This has the effect of retaining the drawable…
Brett
  • 2,635
  • 22
  • 35
31
votes
4 answers

Choose OpenGL ES 1.1 or OpenGL ES 2.0?

I'm going to start a new cross-plattform openGL project (primary for iPhone & PC). So theres the main question: targeting for OpenGL ES 1.1 or OpenGL ES 2.0? Or both? So far I read Open GL ES 1.1 isnt really deprecated, isn't it? So what would speak…
Constantin
  • 8,721
  • 13
  • 75
  • 126
30
votes
3 answers

Android OpenGL ES 2, Drawing squares

EDIT: Problem solved! So I've been going through the official OpenGL ES 2 tutorials for Android, and I've gotten to the part that involves drawing shapes, but I can't seem to get a square to work. It draws a right triangle instead. I've included the…
Jon W
  • 593
  • 1
  • 6
  • 15
1
2 3
99 100