Questions tagged [opengl-es]

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

45 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
3answers
796 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 ...
5
votes
1answer
428 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/...
4
votes
0answers
670 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, ...
4
votes
0answers
394 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
0answers
395 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 ...
3
votes
0answers
400 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 ...
3
votes
0answers
210 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 ...
2
votes
0answers
605 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
0answers
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 ...
2
votes
0answers
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-...
2
votes
0answers
392 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. ...
2
votes
0answers
1k 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 ...
2
votes
0answers
156 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 ...
1
vote
0answers
19 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 ...
1
vote
0answers
53 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 ...
1
vote
0answers
85 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
vote
1answer
54 views

Opengl Es 1.1 Setting Different Transformations For Different Parts of Array

I have the following code: ...
1
vote
0answers
821 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
0answers
308 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
0answers
83 views

Android glsl discard problem

Whenever I use discard or an if statement in my shaders, I get an error message with the text ...
1
vote
0answers
368 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
0answers
957 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
0answers
388 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. ...
1
vote
0answers
163 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 ...
1
vote
0answers
43 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 : ...
1
vote
0answers
222 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
0answers
143 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 ...
1
vote
0answers
78 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
0answers
207 views

LibGDX: Why look BitmapFont pixelated on a scene2d.ui.Dialog?

When I use BitmapFonts directly on the stage table, the fonts looks normal (not pixelated). But when I use the same BitmapFont with the same size on a scene2d.ui.Dialog, the font looks pixelated. ...
1
vote
0answers
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 ...
1
vote
0answers
519 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 ...
1
vote
0answers
110 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 ...
1
vote
0answers
273 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 ...
1
vote
0answers
716 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
0answers
267 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 ...
1
vote
0answers
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
0answers
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
0answers
18 views

Trigger Android Activity with Godot?

I am new to Android programming and game development in android. What I require is to draw graphics in my App like draw a square and move it anywhere with touch, I could even scale it and later I will ...
0
votes
0answers
12 views

Why OpenGL ES2.0 doesn't support linear space while OpenGL ES3.0 supports?

In order to use linear space in Unity,we need to designate OpenGL ES version. Otherwise, it will display that "On Android, linear color space requires OpenGL ES 3.0 or Vulkan, uncheck 'Automatic ...
0
votes
0answers
67 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 ...
0
votes
1answer
155 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
0answers
43 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
0answers
256 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 ...
0
votes
0answers
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 ...
-1
votes
1answer
718 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 ...