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
1
vote
1 answer

OpenGL ES 2.0 - rotate point around pivot point 2D (vertex shader)

I'm trying to rotate vertices around some point in 2D. I found @Rabbid76 solution here https://stackoverflow.com/a/48156351/776388 but I need to rotate around z-vector.
iscariot
  • 434
  • 7
  • 14
1
vote
1 answer

Cubemap texture with bitmap in OpenGL ES 2.0/3.0

When I create a cubemap texture with simple colors, this works well: @JvmStatic fun createSimpleTextureCubemap() { val textureId = IntArray(1) val cubeFace0 = byteArrayOf(127, 127, 127) val cubeFace1 = byteArrayOf(0, 127, 0) ... //…
alexrnov
  • 2,346
  • 3
  • 18
  • 34
1
vote
2 answers

How to pass float array to glVertexAttribPointer

i'm working on OpenGL ES 2.0 shaders on android... i have a float array with position of vertices along with other attributes of vertices. position and other attributes may change over time. how can i pass this modified array to…
sravan
  • 138
  • 1
  • 10
1
vote
1 answer

Font rendering onto off-screen FBO not working. (Note: fonts are loaded by creating textures using Freetype lib with glTexImage2D)

I have the following code to render a rectangle and few texts onto an offscreen FBO. And then I try to bind the texture (attached to FBO) in default/ display framebuffer. I am able to render the rectangle but the fonts are not getting rendered. I…
1
vote
0 answers

What if any operation can I use to check GLSL int precision matches the claimed precision?

I have an OpenGL ES 2.0 app that gets different results for mediump vs highp. Makes total sense. Except that if I query int range[2], precision; glGetShaderPrecisionFormat(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT, range, &precision); printf("Fragment…
gman
  • 100,619
  • 31
  • 269
  • 393
1
vote
1 answer

How to draw the data (from gleReadPixels) onto the default (display) farmebuffer in OpenGLES 2.0

Sorry if I am asking something which is already available. So far I could not trace. I read details about FBO and got a fair idea about off-screen buffering. http://mattfife.com/?p=2813 is a nice little article on FBOs. In all the examples,…
1
vote
1 answer

Combining the OpenGL ES rendering and UI-elements in Android

Android application uses android.opengl.GLSurfaceView to rendering OpenGL ES: public class GameActivity extends AppCompatActivity { private SurfaceView surfaceView; @Override protected void onCreate(Bundle state) { ... …
alexrnov
  • 2,346
  • 3
  • 18
  • 34
1
vote
2 answers

How to Control Particle position with Shaders in OpenGL ES2 on Android

i want to draw a particle system on Android, where the particles are continuously flowing from a specified point. without shaders i'm able to get that by checking for life of particle. if life is zero then reset the position to the center. how to…
sravan
  • 138
  • 1
  • 10
1
vote
1 answer

Some parts are missing when render 3D object in android(java) using OpenGLES 2

I'm new to OpenGL, and I am trying to load a .obj file into my Android application and display it using OpenGLES 2. The object is rendered. But there are some spaces in it like the below image. How can I fix this? This is the actual object. Here…
Venz
  • 33
  • 5
1
vote
1 answer

Transparency shader fills transparent fragments with clear color

I'm trying to make transparent object in OpenGL ES 2.0. It's a live wallpaper, I'm using GLWallpaperService as a base class for this. I'm setting up OpenGL in this way: GLES20.glEnable(GLES20.GL_DEPTH_TEST); …
keaukraine
  • 5,315
  • 29
  • 54
1
vote
1 answer

Circle stretched when rendered in OpenGL ES 2

I've rendered a plain white circle on on my device, but it proportionately stretches it across my device based on the screen dimensions. Scouring around 2D examples & possible answers, I have not been able scale it correctly. My Renderer…
user868935
1
vote
1 answer

Can't Run two Shader Programs together, however Each one work fine when used a lone

Ok been strangling with this for 2 days. I have a small GLES2/Android App... two objects (both are squares but only one has texture coordinates). I have two Shader Programs, one deal with textures and its coordinates, the other just use a color in…
1
vote
0 answers

OpenGL ES 2.0 : how many Shader Programs can be active at the same time

Ok this is probably a very basic question, but I've been digging in the Specs and online forums for more than a day without any luck, I know there is a maximum number of 'bound' textures that I can have , is this also the case for shaders and shader…
1
vote
1 answer

Opengl ES 2.0 - Problem with color opacity by glDrawElements(GL_TRIANGLES)

I created simple c++ class for drawing square in opengl es 2.0. It puts square on specific place with specific color and opacity. All is fine, except opacity. I set color and opacity with function "setColor". I expect 0.0f full transparent and 1.0…
user1063364
  • 791
  • 6
  • 21
1
vote
1 answer

How to organize opengl es 2.0 program?

I thought in two ways to write my opengl es 2.0 code. First, I write many calls to draw elements in the screen with many VAOs and VBOs or one only VAO and many VBOs. Second, I save the coordinates of all elements in one list and I write all vertices…
PerduGames
  • 1,108
  • 8
  • 19