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.
3,923
questions
1
vote
0
answers
27
views
Android OpenGL 2 ES how to generate an infinite 3D grid
Hello I am quite new to OPEN GL ES android.
My task is to generate a 3D grid terrain that is infinite.
The task is tree planting. I am using an RTK system of pretty accurate coordinates that I convent ...
0
votes
0
answers
47
views
Access violation when trying to create 2nd vertex buffer object (VBO)
I am trying to convert a particle system written using fixed function pipeline to use shaders. It has few items like floor, rain, drops, splash.
I am using glfw, glad, and opengl ES 2.0, and since I ...
1
vote
1
answer
25
views
I'm having issues with rendering depth
I'm using GLES2 to make graphics, because I intend to make a mobile application, so it has different things from classic opengl, in the part of creating a framebuffer, I looked for how to do it, and I ...
0
votes
0
answers
33
views
How to calculate orientation matrix
I have a 3d cylinder that represents 3d line. I need to calculate transform matrix which orient cylinder in the direction of the line. I tried with Matrix.setLookAtM:
val lookAt=FloatArray(16)
Matrix....
0
votes
0
answers
45
views
problem in rendering of color texture using OpenGL ES in android
While rendering the color texture on screen i found some unknown behavior of openGL ES.
Here are same code but representation is different.
First code:
#include <stdlib.h>
#include <stdio.h&...
0
votes
0
answers
21
views
Crashed in glDeleteSync Function When using QtWebEngine to play vedio of H5
QT Version:5.12.10
Version of the integrated chrome kernel in QtWebEngine:69.0.3497.128
Platform:Renesas, Linux
The following is the call stack when crashing:
(gdb)
#0 0x0000ffff8766a454 in ...
0
votes
0
answers
27
views
OpenGL ES 2.0: Move fragment shader output inside viewport
Based on this stackoverflow answer:
https://stackoverflow.com/a/55385972
I'm trying to find a way to move the output of fragment shader inside screen coordinates. In that example the output must have ...
0
votes
0
answers
47
views
OpenGL ES 2.0 or 3.0: Pow function issues
OpenGL ES 3.0 on Android, when I use Pow(x) during preprocessing and Pow(1.0/x) during post-processing, image will display abnormally.
At first I thought there was a problem with the middle fragment ...
0
votes
0
answers
32
views
OpenGL ES: how to update my mesh with a new list of vertices?
I draw a 3D mesh between a list of vertices. Every X frames, I want to update completely this mesh ( = either full update or full replacement by a new mesh). How can I do that ?
Here is my code in my ...
0
votes
0
answers
77
views
Blend semi-transparent overlay over HDR content in OpenGL
The set up is the following:
The bottom layer will be an image or video, which sometimes will be HDR. It might run on Android or other hardware, so it's apparently a bit hard to know if the content ...
1
vote
2
answers
49
views
How to only focus on the positive Y-axis portion of graph?
I am new to OpenGL, and have recently successfully drawn my first shapes with the guide on the Android Developers website. Right now I am trying to only focus on the upper half of the graph on my ...
0
votes
0
answers
32
views
Placing two shapes at separate position using gltranslatef opengl
Placing two shapes at separate position using glTranslatef .I draw two square shapes using OpenGL by using glTranslatef function.glMatrixMode(GL_MODELVIEW) display both square shapes on one UI.
Here ...
0
votes
0
answers
40
views
Crash when switching to VBOs in OpenGL ES 2.0
I use this code to render single textured rectangle. I have 2 floats for vertex position, 2 floats for texture coordinates and 1 for texture id.This code works correctly and renders my rectangle (don'...
1
vote
1
answer
40
views
How to vary the color according to the elevation?
I would like to achieve something like this :
However, I fail to get the Y coordinates (before projection) of a given point inside the Fragment Shader.
Here is my Fragment Shader :
precision mediump ...
0
votes
0
answers
52
views
"Creating OpenGL ES 3.0 graphics device" cause unresponsiveness in Electron app
When I try open a web game in my Electron app. I can see that when the web game console says "OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level <OpenGL ES 3.0>" Some ...
0
votes
0
answers
51
views
OpenGL ES 2.0: Blur result is grainy
I use OpenGL ES 2.0 on Android, blur weight is not Gaussian Blur weight, the weight is pixel's light:
weight=rgb2hsv(color).z; -->z is v(hsv)
blur matrix is 15*15:
SAMPLING_COUNT=7;
for (int i=-...
0
votes
1
answer
117
views
OpenGL ES 2 Shader linking fails when accessing texture using i
I'm trying to add support to multiple shadow maps in my shader and it's just not linking when I try to access a sampler2D inside a uniform struct. My fragment shader:
#version 300 es
precision highp ...
0
votes
0
answers
27
views
nVidia NSight shows functions that are not written
I'm writing an OpenglES2 Application and using nSight for debugging purposes.
Right now I'm just drawing a triangle, and that's all, but when I run nVidia Nsight debugger, I see the triangle is ...
0
votes
0
answers
71
views
Why is matrix multiplication row x row 4-5 times slower than row x column on Mali's GPU?
Recently, I encountered a problem when using computer shader to develop matrix multiplication. A common matrix multiplication C = AB. in order to make the memory continuous, I transposed the B matrix. ...
1
vote
1
answer
143
views
OpenGL ES rotating shape around its center
I tried to rotate rectangle using rotateMatrix, following tutorial on https://developer.android.com/training/graphics/opengl/motion, but when I runned it, the rectangle is rotating around (I think) ...
1
vote
0
answers
107
views
Gaussian Shader for OpenGL ES not working on Mali GPU but working properly on Adreno and PowerVR
I created a Gaussian Blur filter on OpenGL ES. I have found out that it is not working on Mali GPUs. Can anyone tell me what am I doing wrong. I have already tried to break long calculation into small ...
0
votes
0
answers
83
views
How to draw a 2d image in java/android studio using OpenGL ES 2.0?
I've been trying(for a couple weeks now) to draw a 2d image using opengl and I just can't seem to get it right. I am very experienced with coding with java/android studio but it's the first time I ...
0
votes
0
answers
75
views
How to draw a 2d image in java/android studio using OpenGL ES 2.0
I've been trying(for over a week) to draw a 2d image using opengl and I just can't seem to get it right. I am very experienced with coding with java/android studio but it's the first time I need to ...
0
votes
0
answers
41
views
Android camera frames - detect motion using OpenGL
There are many methods available to detect motion using camera but many of them use ByteArray, Bitmap in calculation which is quite slow.
In Android we can process camera frames using OpenGL, for ...
1
vote
1
answer
93
views
How to fast flip OpenGL ES FBO?
version:Android OpenGL ES 2.0
I use 5 filters and FBO to render a bitmap, every filter need bitmap texture and bitmap's mask texture, my problem is after every filter render, the next filter get FBO ...
0
votes
0
answers
68
views
Converting camera pose to openGL translation and rotation
I have an inside out tracking camera that gives me its pose in the real world. That is x,y,z data in world coordinates from the origin. The origin is where the camera turns on at 0,0,0. Then it also ...
0
votes
0
answers
247
views
How to move and rotate AR object with openGL ES?
I'm following a google tutorial Here.I want to modify it for some little part.The thing I want to do now is I'm going to add another AR object(It will be an arrow)into the screen,and also I want it ...
2
votes
1
answer
391
views
OpenGL textures into AHardwareBuffer
I came across AHardwareBuffer in Android. I wanted to make use of AHardwareBuffer to store textures so that I can use them on different threads where I don't have an OpenGL context. Currently, I'm ...
0
votes
0
answers
62
views
Cpp - Python connection over SOCKET network
How to make client socket (WINDOWS) side in c++ that receive camera frames that is sent from python(OpenCV) so that i can draw on them with the OpenGL 2.0? Actually the problem is creating augmented ...
0
votes
0
answers
33
views
write a shader that changes pixel data by mask bit array input
i am running google's segmentation algorithm on android, and the output is a bit array mask.
I would like to use openGL to only display the "foreground" pixels of the image (has value "...
0
votes
0
answers
95
views
Drawing lines with unique color and width in OpenGL Android ARCore
Using below LineShaderRenderer for plotting lines on the real space captured in camera, It is handling the drawing lines in 3d space, It has methods to set color and Width, but after changing the ...
1
vote
1
answer
55
views
Using indices not working properly in open gles c++
I am using glDrawElement() for rendering a plain but the indexing is not working as intended so i am getting an irrelevant object .I have used AAssetmanager for loading the coordinates from a ...
0
votes
1
answer
72
views
Is there any special optimization for commands like glReadPixels on the mobile platform?
glReadPixels reads data from the framebuffer located in the video memory to the main memory. On the PC side, the performance is limited by the PCI-E bandwidth. However, on some mobile platforms, the ...
0
votes
0
answers
387
views
checkAndUpdateEglState: invalid current EGLDisplay
I'm trying to use Camera2 recording video by MediaCodec.
There are two parts I want to complete.
1.Use Camera2 recording video by MediaCodec(success)
2.Use OpenGL to add some text labels to my output ...
0
votes
0
answers
148
views
How to pass depth buffer to fragment shader using SCNTechnique
I'm beginner of graphic programming.
Using glsl shader, opengl es2 and SCNTechnique at Scenekit,
making depth peeling for order-independent-transparency.
So I want to pass depth buffer to fragment ...
0
votes
1
answer
42
views
Number of vertices ignored by glDrawElements() in libGDX
I'm attempting to use libGDX to port an Android game which uses opengl es 2.0. Under libGDX the glDrawElements() routine seems to be broken on the PC, but works on Android. On the PC version the ...
-1
votes
1
answer
104
views
Can I write OpenGL ES2 code for android in kotlin without android studio?
I need to write a small opengl ES 2 application for android 8+, but I just want to write a proof of concept with kotlin before deploying it on a phone.
Are there code samples for the specifics of ...
1
vote
1
answer
104
views
Android Camera 2 Portrait Mode in video like IOS
How to achieve portrait mode like blurring the background of image in video of people programmatically, this feature exists in IOS natively now since the last update, I think we can achieve this using ...
0
votes
1
answer
146
views
Drawing 2D text over 3D scene with OpenGLES2?
I'm trying to render 2D text over a 3D scene. The 2D text is loaded using freetype from a TTF font and uses an orthographic projection to render and the scene uses a perspective projection using my ...
0
votes
1
answer
189
views
GLES20 draw texture from image file's byte array
I'm trying to draw texture from image file bytes using opengl:
//Read bytes from image URI
@Throws(IOException::class)
private fun Uri.readBytes(): ByteArray? =
context.contentResolver....
1
vote
0
answers
45
views
OpenGL ES 2.0: How do I customize the convolution kernel?
I want to blur bitmap with some custom shape, like heart/circle or more shape.
box blur or gaussian blur kernel like this(below is box):
[1,1,1]
[1,1,1]
[1,1,1]
I want kernel is like below bitmap, ...
2
votes
1
answer
811
views
How to create a proper rounded rectangle in WebGL?
I have tried to implement the answer from this question but there seems to be a bit of a problem. If you open their ShaderToys and try changing the border radius, the size (width and height) of the ...
0
votes
1
answer
73
views
Cube getting squashed and rendering as trapezium
I'm trying to render a cube and rotate it along it's Y axis using OpenGL ES 2.0, however the cube does not render as a cube but rather as some sort of very flat trapezium. A few images showing the odd ...
0
votes
3
answers
348
views
OpenGL ES 2.0 GLSL shader doesn't compile
I have an OpenGL app with a simple shader that run well on an emulator device in Android Studio with API 30 but on my own hardware device (API 30) it doesn't.
The problem is in the fragment shader. ...
2
votes
0
answers
113
views
Get context used by Qt/QML 5.X in WebAssembly build
Lately I've been trying to build a Qt/QML WebAssembly using Qt 5.15.2 ( compiled with -opengl es2 ) and Emscripten 1.39.7 with C++ on Windows.
This works as intended. I'm using a simple QML ...
0
votes
1
answer
509
views
How to create a simple fragment shader that maps color from a lookup table?
I am trying to create image filters like Instagram for my Android application. I am new to image processing and have just stumbled upon this term called color mapping. After many research, I tried to ...
0
votes
1
answer
163
views
Android How to generate mipmap for GL_TEXTURE_EXTERNAL_OES
When i render the cameraTexture to a low resolution SurfaceView, it looks pixelated.
Seems i need to generate mipmap for the camera texture, but it doesn't work this way.
GLES20.glActiveTexture(GLES20....
0
votes
2
answers
190
views
eglCreateWindowSurface() can only be called with an instance of Surface, SurfaceView, SurfaceTexture or SurfaceHolder
I am using RecordableSurfaceView
https://github.com/spaceLenny/recordablesurfaceview/blob/master/recordablesurfaceview/src/main/java/com/uncorkedstudios/android/view/recordablesurfaceview/...
1
vote
1
answer
62
views
Why moving eye position will cut (clip) 3d object?
Why moving eye position, using setLookAtM, will clip the 3d view of my model?
I am moving eye Z position using time.
Please check video and code:
import javax.microedition.khronos.egl.EGLConfig
import ...