Questions tagged [opengl-es]
Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.
14,057
questions
-1
votes
0
answers
30
views
OpenGL : Triangles not rendered with color array added
GLfloat vertices[] = {
0.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f
};
GLfloat colors[] = {
1.0f, 1.0f, 0.0f,
1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f
...
0
votes
0
answers
19
views
OpenGLES(3.0) glFinish immediately after FenceSync in multi-threaded
The status of multi-threaded rendering OpenGL ES is as follow:
Thread A
glBindFrameBuffer(...);
...
glDrawElements(...);
...
GLsync sync = glFenceSync(...);
Thread B
....
glWaitSync(sync , flags, ...
0
votes
0
answers
16
views
noise function not generating the expected output [closed]
I am trying to generate a value noise with a noise function in glsl and i am getting wierd output.
This is my shadertoy i am working on
https://www.shadertoy.com/view/mdtyD2
and this is my glsl code:
/...
1
vote
0
answers
44
views
+500
Android Camera2: CPU/GPU access to Image data and MediaRecorder/MediaCodec in the same pipeline
I am the maintainer of a popular cross-platform mobile camera library that can do preview, photo capture, video capture, and frame processing at the same time.
On iOS, this works perfectly.
But on ...
0
votes
1
answer
25
views
Another OpenGL Z Fighting question : Can I enforce a fragment shader to draw last?
I'm doing this on Android but I've not had much success so far.
I have a 3D mesh, something like a terrain/height map.
I then have a plane that clips horizontally through the mesh (think of it as ...
0
votes
0
answers
27
views
How to pass time to a shader in android using openGL es
I'm quite new to openGL and have a very specific requirement to create rain effect in my android app. I found a tutorial of three.js to create such graphics but it is passing a time variable which ...
0
votes
1
answer
14
views
GLES sampler2d will only draw what is in the first texture slot
Currently using Android Studio, writing in Java and GLES3 a mobile app. I am trying to get multiple textures in my program and it seems that my shader will only draw what is in GL_TEXTURE0, regardless ...
0
votes
0
answers
32
views
I can't see my texture, just a black screen instead
I want to display the texture in openGL-ES 1, but the code below just displays a black screen
class MyGLRenderer(val context: Context) : GLSurfaceView.Renderer {
private var textureId = 0
...
0
votes
0
answers
32
views
How to display texture in opengl es 1.1
I'm just learning open-angle and I need to render a texture on my existing object in the scene.
I get the texture id and then I want to output it to my object. Here is my object code
val ...
-1
votes
0
answers
32
views
OpenGL FrameBuffer Fail on Android NDK C++
I'm trying to create cubemap with 5 mipmaps but it doesn't work some of the android devices, even some of the decent phones glGetError() or glCheckFrameBufferStatus() gives ...
0
votes
0
answers
13
views
Unity Shader Compilation strips keyword STEREO_MULTIVIEW_ON on GLES3
I am developing my own Unity XR plugin but I'm having trouble getting the Multiview (Singlepass) feature to work.
After inspecting the shaders by compiling and showing the code, I discovered that ...
0
votes
1
answer
30
views
How does Android's ImageWriter work under the hood?
I have a custom Camera2 OpenGL pipeline to process frames from a Camera device.
I have two target EGLSurfaces that I just send the EXTERNAL_OES OpenGL texture to using a pass-through Shader.
This is ...
0
votes
1
answer
26
views
Android: Custom NDK/C++ android.media.Image implementation backed by OpenGL texture/HardwareBuffer
I'm working on a Camera2 app where I have a custom OpenGL pipeline set up for processing video frames.
In my pipeline, I use a couple of different third party frame-processing APIs that expect an ...
0
votes
0
answers
51
views
Ways to reduce memory transfer overhead in OpenGL ES 2.0 / OpenGL 2.1 with EGL 1.4 for rendering offscreen
I'm fairly early into trying to do some image manipulation tasks on a headless embedded device running linux with a MALI 400 GPU. This supports OpenGL ES 2.0 through an official driver, and possibly a ...
9
votes
0
answers
253
views
OpenGL/Skia rendering GL_TEXTURE_EXTERNAL_OES to GL_TEXTURE_2D
I'm having a weird issue with my OpenGL/Skia Android Camera2 app.
My Camera renders frames into a SurfaceTexture, which is a GL_TEXTURE_EXTERNAL_OES texture in OpenGL.
I can then simply render this ...
0
votes
1
answer
30
views
not able to understand the fract function graph
This graph:
...is of:
y = fract(sin(x)*1.0)
I was expecting the graph like this:
am i missing something?
I dont know how i can plot this graph in glsl so don't know how to check so i thought i can ...
0
votes
1
answer
83
views
What's the difference/relationship between GLFW and EGL?
I know that GLFW can help create context and manage window/... for OpenGL, OpenGL ES, and Vulkan;
Also learned that, in Android, we use EGL + OpenGL ES;
So my question is, is EGL a part of GLFW (like ...
0
votes
1
answer
15
views
How to render android.media.Image using OpenGL ES in Android
I am using MediaCodec to decode a video, for some reason I cannot config the codec with a Surface. So I render the video using EGL. Here is my render logic.
videoDecoder.setStateListener(object : ...
1
vote
1
answer
184
views
Implementing Pencil Brush Texture in OpenGL for Drawing Application
I am working on a drawing application in OpenGL and would like to simulate a pencil brush similar to what applications like Krita and Procreate use. However, I'm facing challenges with getting the ...
0
votes
0
answers
26
views
How do I bind the Flutter openGLES with an Android TextureView?
I am currently in the process of developing a Flutter plugin that utilizes an Android TextureView to render a view. This rendering process relies on a shared native library (libRender.so).
On the ...
0
votes
0
answers
21
views
Android SurfaceTexture save previous texture for later use
I am using surfaceTexture class on Android to get frame from camera.
The surfaceTexture expects an opengl "GL_TEXTURE_EXTERNAL_OES" texture at creation and each time a new frame is available ...
0
votes
0
answers
41
views
Implementation of "Optics Compensation" effect
I'm trying to replicate effect from Adobe After Effects called "Optics Compensation". I think it is similar to Lens Distortion. But the formulas that are used there do not fit.
This effect ...
-1
votes
1
answer
52
views
OpenGL async texture loading
I'm using OpenGL ES 2 and am trying to load textures in the background using st::async however because I'm loading the image into a GL texture in a thread it doesnt work how its supposed to, I read on ...
0
votes
0
answers
55
views
ExoPlayer always automatically stops when playing videos
I am using ExoPlayer as follows:
import androidx.media3.exoplayer.ExoPlayer;
I am attempting to use SurfaceTexture to retrieve video frames from ExoPlayer and render them in openGL ES. However, after ...
0
votes
1
answer
26
views
How to specify the target of one OpenGL ES texture
Got one OpenGL ES texture from other lib, want to specify its target.
// got from other lib, no more information about it's target, format..
void *a = foo();
// glBindTexture(GL_TEXTURE_2D, (...
10
votes
2
answers
315
views
Camera2 Pass Images from ImageReader to MediaRecorder
I'm trying to create a Camera2 CameraCaptureSession that is capable of four outputs:
On-screen preview (SurfaceView, up to 1080p)
Photo capture (ImageReader, up to 8k photos)
Video Capture (...
-1
votes
1
answer
62
views
The shader on OpenGL ES 2.0 does not work the same way as the shader on WebGL
I created a wave equation shader on shadertoy.com: You can see how it works by the link https://www.shadertoy.com/view/dtsyD2
Then I copied the code into my Android project working with GLES 2.0, ...
1
vote
1
answer
79
views
How to blur content behind of an overlay using java?
I have an layout that I can expose above other applications using Context.LAYOUT_INFLATER_SERVICE. But no matter how much I searched, I couldn't find a way to blur the content under this view to the ...
0
votes
0
answers
21
views
Texture mapping issue in JPCT game engine
In a Blender every textures displays fine, but not in the Engine
Sorry for my English. Recently I found on a game engine for Java - JPCT and decided to try to create a small game. I'm having a problem ...
0
votes
0
answers
15
views
Dynamic programatical binding of OpenGL ES compute shader program arguments
I am new to OpenGL ES. I am using compute shader alone for compute intensive works to port OpenCL and CUDA programs. I have a problem in binding compute shader program parameters dynamically ...
0
votes
1
answer
25
views
Is it faster to use multiple shader programs or a single program with uniform uploads in OpenGL ES 3.0?
I have a setup where I use the same shader source for multiple objects rendered via VBOs and indices through glDrawElements(). I was wondering whether it's faster to create multiple GL shader programs ...
0
votes
1
answer
49
views
How to implement GLSurfaceView.EGLContextFactory in Android application to create an OpenGL ES context so that we can check the OpenGL ES version?
My question is How could I print the maximum OpenGL ES version supported by a physical device by implementing GLSurfaceView.EGLContextFactory ?
I was following a tutorial here on how to setup
the ...
0
votes
0
answers
19
views
Texture not appling in OpenGL Android
I have been trying to implement the texture to put an Image into the GlSurfaceView, but unable to , the result is no extra updates on the Screen.
This implementation is a modification of the square ...
0
votes
0
answers
22
views
ARCore Android: unable to find the child nodes for a parent object?
I was working on ArCore in android; I was looking for these nodes with names inside my 3d model.
I tried creating a function and search for a specific name but when I checked it in android studio the ...
1
vote
0
answers
63
views
Playing Video using MediaCodec and OpenGl ES creates a delay
I am trying to play a video from a file using MediaCodec to decode the file and OpenGl to apply wanted changes, I successfully wrote a code that plays the video and add the wanted changes... It works ...
0
votes
1
answer
66
views
ARCore Android Studio- How to place 2d textiew on back of the 3d Model android and rotate?
I have a 3d model and a viewRenderable layout
This is how i loaded the model
model = ModelRenderable.builder()
.setSource(
requireContext(),
...
0
votes
0
answers
18
views
android GLES20.glReadPixels returned 0 on some devices
I am developing a camera app using OpenGL.
I found that GLES20.glReadPixels works fine but does not work with some devices.
It works smoothly on almost all devices, but only on the Galaxy S10 and ...
0
votes
1
answer
30
views
OpenGL ES - Fragment shader version
I just got started with OpenGL ES on Android, and I can't seem to specify the version of OpenGL to use in the fragment shader.
This version compiles and runs successfully
void main() {
gl_FragColor =...
3
votes
1
answer
395
views
How to have a live wallpaper that can scroll while showing a video?
Background
I've been familiar with using Canvas to draw a Bitmap in a live wallpaper, and eventually I also tried out playing GIF animation in a live wallpaper (here) and a simple video playing (here)
...
0
votes
0
answers
24
views
White screen on Android Studio Emulator, Unable to access OpenGL ES Renderer
Currently whenever I run my app on android studio, all that appears on the emualator is a white screen. I've looked at other answers to this same problem that say to make changes to OpenGL ES renderer ...
0
votes
0
answers
21
views
onCreate function never called in activity using OpenGL
I'm trying to write a plugin for an app in Android Studio using a separate tool that generates C++ files and uses openGL to create symbols. The code I have runs fine as a standalone app, however I'm ...
0
votes
0
answers
30
views
Compute shader fail to write data to destination texture with format rgba32f
I am new beginner openGL ES, I tried to wrote a very simple sample compute shader to run on Android device.
Below is shader:
#version 310 es
precision highp image2D;
layout(local_size_x = 1, ...
0
votes
1
answer
30
views
Why won't my fragment shader apply to the texture of my door object node in the view of the scene in spritekit?
I am having a problem getting an openGL fragment shader .fsh to appear on the texture of my Sprite in Spritekit. I downloaded a second shader file for troubleshooting purposes and it DID work. So what ...
0
votes
0
answers
31
views
Want to store info in the alpha channel but NOT have it blend the pixel
This is regarding an SSAO buffer. I'm storing the normals in RGB. If I don't put 1.0 in A, it will blend the normals with what's already there as a normal alpha blend operation.
I want to store some ...
0
votes
1
answer
30
views
Does declaring unused linked uniform consume memory/performance?
Let's say I have a foo uniform linked to a shader program and actually used in the vertex shader:
uniform sampler2D foo;
...
What if I declare the same uniform uniform sampler2D foo; in the fragment ...
0
votes
0
answers
54
views
android mesh reconstruction out of a point cloud
I need to reconstruct a mesh from a point cloud for an Android application. This app creates a mesh from a large point cloud and then measures the distance between two randomly selected points on the ...
1
vote
1
answer
112
views
How to detect click on objects in OpenGL ES 2.0
I need the program to detect when I click on the drawn object
How can this be done in OpenGL ES?
I get an array of coordinates and draw them on the field. I should be able to click on rendered points, ...
0
votes
0
answers
63
views
from 2d window coordinates to 3d world coordinates with opengl and gluUnProject function
I've got a pair of window coordinates taken from a screen touch and I'm trying to retrive the 3d coordinates for calculate the distance between another point in a large point cloud.
I used ...
0
votes
0
answers
62
views
Color manipulation of a 3D model dynamically in OpenGL ES
I’m working on a demo project where I’m using OpenGL with Jetpack Compose. I’m taking reference of this library to move my 3D model in a horizontal scrollable manner which I have achieved but the next ...
1
vote
0
answers
20
views
Why does mbufferid sometimes equal 0 in OgreGLES2HardwareBuffer::createBuffer and how to fix it?
Ogre.log:
Cannot create GL ES buffer in OgreGLES2HardWareBuffer::createBuffer at OgreGLES2HardWareBuffer.cpp (line 55)
system: huawei matepad pro, hamonyOS 2.0.0
the code in ogre is: glgenbuffer(1, &...