Questions tagged [opengl-es]

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

50 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12 votes
3 answers
1k views

How to hide a post-processed mesh outline when/where the mesh is hidden

I'm working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some ...
  • 221
5 votes
1 answer
484 views

How to clip or mask entity in android/andengine?

I want to implement masking with sprite in Andengine. I want same functionality as in ios class called SKCropNode which works like an masking node! Is there any workaround like this in andengine/...
  • 191
4 votes
0 answers
1k views

How and when to split draw calls in OpenGL and OpenGL ES

My application (with a modernish OpenGL >= 3.0 and an OpenGL ES 2.0 backend) renders more or less streaming data with up to millions of vertices with different vertex layouts and sizes (some simple, ...
  • 181
4 votes
0 answers
459 views

LibGDX Shader works fine on desktop but does not work at all on Android device

I made a very basic shader that works perfectly fine on Desktop, but when I try it with an AVD the sprite affected by the shader is not drawn. I have tried with WQVGA API 16 and Nexus S API 23. I have ...
4 votes
0 answers
508 views

Using depth values for fake ambient occlusion

I'm using the normalized distance to the camera to get depth information in the fragment shader. When using this value as fragment color, it looks at lot like ambient occlusion (of course only in the ...
  • 83
3 votes
0 answers
433 views

Making use of the Android GPU debugging tools

I tried following the manual to install the Android GPU debugging tools for android Studio 2.0. Unfortunately it has not been very successful. I have been following the instructions of the official ...
  • 131
3 votes
0 answers
237 views

OpenGL ES 2.0 not drawing images with shadows

I'm using OpenGL ES 2 to program a simple game 2D for Android mobile phones. I'm coding the rendering portion of the software, using the GLES20 default library. All my sprites are rendered from a ...
3 votes
0 answers
2k views

Depth sorting 2D textures in a batch with OpenGL ES 2.0

I have a combo of texture atlases and sprite batches in an OpenGLES 2.0 2D game I'm developing which is working well, but I have a problem with depth sorting. I'm using atlases to reduce the number ...
  • 303
2 votes
0 answers
666 views

Texture coordinates for custom geometry in SceneKit ios9

I am trying to texture the a custom plane shape I created in scenekit on iOS9. I need the texture to spread out and stretch over the entire surface. I have a vertex and fragment shader on an ...
2 votes
0 answers
2k views

Libgdx implement 2d drop shadow for transparent sprites

I am a libgdx learner. For an learning application that I am developing using libgdx on android, I need to show drop shadow or glow effect when a sprite is touched. The sprites are created from a ...
  • 21
2 votes
0 answers
1k views

Weird y offset when using custom frag shader (Cocos2d-x)

I'm trying to mask a sprite so I wrote a simple fragment shader that renders only the pixels that are not hidden under another texture (the mask). The problem is that it seems my texture has its y-...
  • 141
2 votes
0 answers
411 views

iPhone GLSL shader dynamic branching issue

I am trying to pass an array of vec3 as uniform and then iterate through them on each pixel. The size of array varies on situations so I can't make the loop with constant number of iterations. ...
  • 59
2 votes
0 answers
158 views

Is there a way to export 3D objects with animation from Blender or any other app into OpenGL ES 1.1 code?

The problem is that all the examples I've found are obsolete or iOS/Android specific and not "pure" OpenGL ES 1.1. If anyone can provide me with a good example/tutorial/book it would be very much ...
2 votes
0 answers
1k views

OpenGL ES multiple objects not being rendered

I am doing the following to render multiple balls move around the screen but only 1 ball is seen to appear and function. I don't know why the rest (count-1) balls are not being drawn ...
1 vote
0 answers
682 views

OpenGL Compute Shader vs Fragment Shader device support

I have a game with massively parallelizable logic, which I intend to write calculate on the GPU (Java/LibGDX). I am planning to implement a logic for it through a fragment shader, instead of a compute ...
1 vote
0 answers
63 views

OpenGL ES - render to texture - how to preserve original depth buffer

I render to texture and attach my own depth buffer that has texture target. However, after I finish rendering I would like to set original depth buffer back. To start rendering to texture I do: ...
  • 1,096
1 vote
0 answers
116 views

Techniques for cursor snap-to-vertex in WebGL or OpenGL?

What's a technique for snapping the mouse pointer to vertices in WebGL or OpenGL? All I need is the vertex position, no other info. Ideally, I'd like to do this without needing to keep positions and ...
  • 147
1 vote
0 answers
82 views

How to update FBO's depth texture?

I have an FBO with only 16-bit depth attachment: glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, w, h, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, nullptr); I ...
  • 131
1 vote
0 answers
95 views

Android - OpenGL - detect slow GPU

I have app for Android with OpenGL. It uses GPU-heavy effects and on "slow" GPUs this leads to low FPS. Is there a way, how to detect "slow" GPU during app start and disable those effects and generate ...
  • 1,096
1 vote
1 answer
61 views

Opengl Es 1.1 Setting Different Transformations For Different Parts of Array

I have the following code: ...
1 vote
0 answers
980 views

Applying Rotation Vector to OpenGL camera or "view matrix"

I'm building an augmented reality application where I want objects on the screen to move with respect to the orientation of the phone. For example, if the phone is held still - the object stays at the ...
1 vote
0 answers
385 views

Line stipple with OpenGL ES 2.0

I found many threads about line stipple (dashed or dotted lines) with OpenGL ES2.0, but there are never any code examples or tutorials on how to implement it. How do I implement line stipple in ...
1 vote
0 answers
91 views

Android glsl discard problem

Whenever I use discard or an if statement in my shaders, I get an error message with the text ...
  • 14.6k
1 vote
0 answers
464 views

Texture rebind on android cause potential memory leak?

After context lost, I have to rebind all my textures. I want to it the correct way, so I check each handle for availability. It's done by calling unloadFromVram(), ...
1 vote
0 answers
1k views

How to draw 2D pixel data with OpenGL

I am fairly new to OpenGL. I have a 2D game in SDL2 that uses currently works by creating a SDL_Surface from the pixel data, copying it into a ...
1 vote
0 answers
529 views

Logical operations per component in GLSL

According to the OpenGL spec in GLSL, the logical operators: &&, || etc work between booleans, not vectors of booleans. ...
  • 111
1 vote
0 answers
186 views

How do I keep stencil object outlines from affecting each other?

I was trying to make two object outlines using the stencil buffer. One would color the object with orange and other with green. I just wanna know if is it possible to have two object outlines at the ...
  • 123
1 vote
0 answers
45 views

How to use quaternion on another referential

I'm new on Three.js and despite a mechanical background, I can't find how quaternion works: it's like it always refers on local part referential and not the global one. I've illustrated it here : ...
  • 111
1 vote
0 answers
233 views

How to render multiple objects as a single object for fluid simulation?

I'm trying to do fluid simulation using particles in 2d game. I have larger particles, which interactive each other physically, those particles collide with environment (e.g wall,obstacles) to ...
1 vote
0 answers
160 views

Weird blending behavior on PowerVR SGX544MP2

On PowerVR SGX544MP2, sometimes blending behaves in a very strange way for me. Instead of blending with the actual color from the previous draw calls, it tries to blend with black: (sorry about the ...
  • 606
1 vote
0 answers
98 views

Android OpenGLES, getting number of fragments passed depth test/Occlusion Query?

Afeter reading many blogs and searching on Internet, I did not get any sloution for getting number of fragments/pixels which are occludded or not occludded of the object on OpenGL ES3.0 Android ...
1 vote
0 answers
1k views

How can I reduce draw calls when using glBufferSubData and DYNAMIC_DRAW?

At first I had the problem where I had about 150 rectangles rendered every tick. I only used STATIC_DRAW and glBufferData. I ...
  • 67
1 vote
0 answers
533 views

How can I use a Seekbar as a brightness slider?

I am using the GLSurfaceView Renderer. I want changes to a seek bar's progress to increase the brightness of a GLSurfaceView ...
  • 113
1 vote
0 answers
115 views

Android opengles how to use glunproject

How to use glunproject in my android app? I have the following parts in my engine: A projection matrix A view matrix for the camera A model matrix for each of the objects in my world. This matrix is ...
  • 836
1 vote
0 answers
283 views

Android multi screen rendering

Is it possible on Android to render specifically / only, to the connected Monitor/TV on the hdmi port? If so, is it possible to use OpenGL ES to render a different scene on the monitor and on the ...
  • 836
1 vote
0 answers
717 views

To stop Spite animation scrolling along the background in openGL ES

After using the endless road algorithm as described here, I also implemented the scrolling of walls along with it. I have the walk animation of the person which is stationed at the center of the ...
1 vote
0 answers
286 views

Remove "dots" noise (like from dot-matrix printer)

I have 2D array of floats. Using the floats, I generate image by doing proportional selection of color from between COLOR_MIN, COLOR_MAX – for maximal float value at given (x,y), I choose COLOR_MAX ...
  • 251
1 vote
0 answers
1k views

Rotation deforming mesh (Opengl ES 2.0)

I'm trying to render a rotating cube on Opengl ES 2.0, using some math classes I wrote (based on a lot of online and offline info) for quaternions, matrixes and the like. As far as I know all the math ...
0 votes
0 answers
17 views

Trying to write to GL_R16UI buffer, but everything is zero

I've written some render data to an offscreen RGBA texture, and it works. However, I don't need a full 32 bits to hold this data, so I wanted to convert to a 16-bit buffer where I can just write ...
0 votes
0 answers
88 views

What's the solution to this kind of shadow acne?

I'm working with a OpenGL ES/GLSL homebrew engine my company developed, in C++. Below is a screenshot of it rendering shadow acne. The light's direction is too perpendicular to the face of the curve ...
0 votes
0 answers
28 views

Opengles glBindBufferBase has weird performance issue

I am now doing some optimization for rendering process. I notice that in my game some objects is totally static and never changed. In my old way, I will create a uniform buffer every frame, and put ...
0 votes
0 answers
47 views

Cuda API to render using Physically Based Rendering (PBR) in OpenGL-ES based project

I need to develop a OpenGL-ES based application to render a model using Physically based Rendering (PBR). Do I need to use Cuda API to render the computation intense PBR rendering? Is there any ...
  • 115
0 votes
0 answers
30 views

NDK opengl-es unknown error

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago ...
  • 21
0 votes
0 answers
107 views

How do i update opengl lightning equation in my fragment shader to make my texture less glossy and more like a fabric

I built a model in blender, and am currently trying to import it into my android app using assimp together with opengl, i dont have any issues with the importing but my goal is to make the object look ...
  • 101
0 votes
1 answer
190 views

Issues to display a texture loaded with libPNG with opengles 3.0

I'm trying to load a texture loaded with libPNG on a XY coordinates. I know the width and the height of the texture (32x32). The texture is already loaded successfully and I have his Id. Here is my ...
0 votes
0 answers
64 views

Rendering artifacts on edges in Cardboard VR OpenGL ES 2

Unity beginner here. I've encountered this weird rendering artifacts in my Cardboard VR app on Android OpenGL ES 2: https://youtu.be/uJm4d3MwbRo It doesn't occur in WebGL build: http://senovsky.wz.cz/...
0 votes
0 answers
298 views

OpenGL ES wrong orientation

I'm writing a little Android game in OpenGL ES. My game graphics are not appearing in the right orientation. In fact everything is drawn in reverse vertically. Can someone please comment on my ...
user avatar
0 votes
1 answer
208 views

Libgdx OpenGL ES pixel shader behaves differently on android and on desktop

I'm currently working on a mobile game that ressembles a snake game ; what I wished to do was use my limited glsl knowledge to write a pixel shader that could efficiently draw a curve with a certain ...
0 votes
0 answers
128 views

Make a layer over an image and adjust its co-ordinates by touch

I need to make a layer over an image and adjust the layer to fit to image and get its co-ordinates of the layer. I need to adjust the layer by touch and pinch. The sample image is as below. I need ...
  • 131
-1 votes
1 answer
720 views

2D triangle with OpenGL ES on Android

I am trying to draw a triangle on OpenGL ES. I followed a tutorial to do it. even though everything seems to be fine it does not work. Everytime I run my code it sends me back to main menu. this is ...