Questions tagged [opengl-es]

Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.

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

Current version is OpenGL ES 3.2 (), publicly released in August 2015.

OpenGL ES 2.0
OpenGL ES 2.0 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.

OpenGL ES 3.0
The latest major version is the OpenGL ES 3.0 specification, publicly released in August 2012. OpenGL ES 3.0 is backwards compatible with OpenGL ES 2.0, enabling applications to incrementally add new visual features to applications.

More information at

  1. Khronos Official page
  2. Wikipedia page on OpenGLES
  3. Khronos OpenGL ES Registry

Books:

14058 questions
24
votes
2 answers

What is the easiest way to draw line using OpenGL-ES (android)

If I have custom renderer in opengl-es prepared: public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); // here i want to draw line from [0, 0, 0] to [1, 0, 0] } What is the easiest and shortest…
Michal
  • 3,584
  • 9
  • 47
  • 74
24
votes
2 answers

OpenGL - why is GL_ELEMENT_ARRAY_BUFFER for indices?

I'm currently new to the OpenGL ES 2.0 realm and would like to understand as much as I can regarding binding, buffers, shaders, etc. As of now, I'm just trying to understand the differences between GL_ELEMENT_ARRAY_BUFFER and GL_ARRAY_BUFFER and…
TheCodingArt
  • 3,436
  • 4
  • 30
  • 53
24
votes
1 answer

OpenGLES on Android - IllegalStateException: setRenderer has already been called for this instance

I'm new to OpenGL-ES on Android, so excuse me for my noobish question. I'm building this program for Android v2.2 - SDK#8. My tablet supports up to Android v3.1 I'm trying to setup an OpenGL-ES environment for Android by following a tutorial on…
TATN
  • 1,249
  • 2
  • 12
  • 26
24
votes
2 answers

Simple GLSL convolution shader is atrociously slow

I'm trying to implement a 2D outline shader in OpenGL ES2.0 for iOS. It is insanely slow. As in 5fps slow. I've tracked it down to the texture2D() calls. However, without those any convolution shader is undoable. I've tried using lowp instead of…
user1137704
  • 349
  • 1
  • 3
  • 12
24
votes
4 answers

Converting from GLSurfaceView to TextureView (via GLTextureView)

When Android 4.0 (Ice Cream Sandwich) was released, a new view was introduced into the sdk. This View is the TextureView. In the documentation, it says that the TextureView can be used to display content for an OpenGL scene. When you look up how to…
William Goodale
  • 611
  • 1
  • 5
  • 6
23
votes
4 answers

Android. How play video on Surface(OpenGL)

Need to help How play video on Surface(OpenGL) in Android? I tried playing video in mySurfaceView extends SurfaceView with help method setSurface() in MediaPlayer. SurfaceTexture mTexture = new SurfaceTexture(texture_id); Surface mSurface = new…
user1221256
  • 329
  • 1
  • 2
  • 7
23
votes
3 answers

Clipping-planes in OpenGL ES 2.0

I need to clip a few hundred objects under a clipping plane in OpenGL ES 2.0 and would appreciate ideas from people more experienced with this subset of OpenGL. In OpenGL ES 1.x there is glClipPlane. On the desktop you have glClipPlane, or…
Emil Romanus
  • 794
  • 1
  • 4
  • 8
23
votes
1 answer

SurfaceTexture's onFrameAvailable() method always called too late

I'm trying to get the following MediaExtractor example to work: http://bigflake.com/mediacodec/ - ExtractMpegFramesTest.java (requires 4.1, API 16) The problem I have is that outputSurface.awaitNewImage(); seems to always throw…
manixrock
  • 2,533
  • 4
  • 24
  • 29
23
votes
4 answers

java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS

I've an OpenGL application in the Google Play Store and I'm facing a daily exception: java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1085) at…
Andi Droid
  • 1,987
  • 2
  • 12
  • 7
22
votes
3 answers

Packing float into vec4 - how does this code work?

I am trying to study shadow mapping in WebGL. I see same piece of shader code copied in various libraries and examples that achieve this. However nowhere did I find the explanation of how it works. The idea is to save a depth value (a single float)…
Jayesh
  • 51,787
  • 22
  • 76
  • 99
22
votes
3 answers

Android game: Canvas or OpenGL?

I am to write a game for Android, and I have to choose between Canvas or OpenGL for drawing. I have read that Canvas doesn´t have a good frame rate, but what is good? Imagine you were going to write an Angry Birds type game, would Canvas frame rate…
seipey
  • 549
  • 2
  • 6
  • 14
22
votes
1 answer

Hardware-accelerated OpenVG implementation on Desktop based on OpenGL ES

I'm currently trying to get OpenVG up and running on my desktop. The problem comes here: I am / will be developing an application for a Windows CE device (with .NET compact framework), which has hardware-accelerated OpenGL ES 2.0 and OpenVG 1.0.1…
OregonGhost
  • 23,359
  • 7
  • 71
  • 108
22
votes
6 answers

How to limit framerate when using Android's GLSurfaceView.RENDERMODE_CONTINUOUSLY?

I have a C++ game running through JNI in Android. The frame rate varies from about 20-45fps due to scene complexity. Anything above 30fps is silly for the game; it's just burning battery. I'd like to limit the frame rate to 30 fps. I could switch…
grinliz
  • 580
  • 1
  • 4
  • 8
22
votes
4 answers

Android OpenGL ES glDrawArrays or glDrawElements?

What is the best way: if I use glDrawArrays, or if I use glDrawElements? Any difference?
lacas
  • 13,928
  • 30
  • 109
  • 183
22
votes
1 answer

How to pass uniform array of struct to shader via C++ code

for eg. in FragmentShader:- struct LightSource { int Type; vec3 Position; vec3 Attenuation; vec3 Direction; vec3 Color; }; uniform LightSource Light[4]; main(){ //somecode } Now how can i send…
jpm
  • 1,042
  • 2
  • 12
  • 36