Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [opengl-es]

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

0
votes
0answers
24 views

OpenGL texture management

I have an OpenGL engine built using bindless textures, which allows me to store all materials in an UBO and drawing thousands of instances with different materials in one pass, by accessing the ...
0
votes
1answer
30 views

PVRCT Texture Format with glTexStorage2D on Open GL 3.0 ES How?

I've looked everywhere and I can't seem to find the answer. How can I use glTexStorage2D with PVRCT textures? I've done this: ...
0
votes
2answers
68 views

Rotating a Quad in Shader

I'm working Opengles2 and I have a just a texture ID and a quad from an SDK and its shader, and I can not access their code, just the vertex and pixel shader. The quad from the SDK is rotated and ...
0
votes
0answers
14 views

android native app is crashing

I am trying to setup android native framework so that I can receive events and touch inputs. I have created a cpp file which has android_main and configured CMake... ...
1
vote
2answers
63 views

Draw text in OpenGL ES 3D game?

I am making a game using OpenGL ES 1.0 and I want to keep player score. So I need to draw text dinamically. What is the best approach? Some library, textures, bitmaps? I tried to use TextView but ...
3
votes
2answers
146 views

How to make the camera follow the player in Libgdx?

In Play class I have the viewport of game height=320 and game width=240unitswith camera cam. I have set the camera(cam) viewport width to 10 and viewport height to 7.I have another camera hud whose ...
0
votes
0answers
33 views

How widely supported is glBlendFuncSeparate

I need to use glBlendFuncSeparate to implement this answer. I'm implementing this in a rendering engine that needs to run on multiple platforms (ios, android, ...
0
votes
0answers
45 views

Is it possible to offset the Vsync timing of Android on hardware level?

To clarify, I would like to offset the actual timing of when the next screen refresh happens. I am creating a multiplayer game where the server sends packets to clients at 60Hz and I would like these ...
2
votes
1answer
40 views

How to associate multiple arrays of vertex data and uv data with an attribute? OpenGL ES

I create the buffers to to put on them the vertex data and uv data: ...
2
votes
1answer
27 views

How to transform only part of an array in OpenGL ES?

I have one texture atlas of which I select the "non-animated textures", I put all vertex and UV coordinates in two array: ...
0
votes
0answers
76 views

How to display multiple texture in OpenGL ES 2?

I'm trying to display two textures with just one fragment and vertex shader; the first texture like a background and the second texture on top of the background. At this moment I have this code: <...
0
votes
1answer
67 views

Black screen when trying to render multiple textures

I generate an array for two textures: ...
0
votes
1answer
56 views

OpenGL ES texture rendered not as expected with disproportional aspect ratio triangles

I cannot seem to understand how texture coordinates work. I try to render a texture into two triangles and this is what I get Where the expected output is a normal continuous image as you can imagine....
3
votes
1answer
118 views

OpenGL ES 2.0 cannot understand how to use 2D ortho projection and shaders

I am migrating an app that draws on OpenGL ES 1.0 to OpenGL ES 2.0. The app used to draw multiple 2D triangles, as a vertex array, where the vertices matched the pixels on screen. I made a sample ...
0
votes
1answer
132 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
22 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/...
2
votes
2answers
135 views

What are “free vertex indices” in WebGL 2 and how do they relate to geometry shaders?

In January Notch tweeted about WebGL 2: WebGL 2 is happening. Bye, compatibility! Hello, 3d textures and pixel buffers! oh god it's got free vertex indices in the shader. That is basically a ...
1
vote
1answer
39 views

Texture does not fit the screen

Hi guys I am really new in OpenGL-ES and I am developing a simple android application with NDK, and I just want to ask why the image is not fit after I set the width and height of it. this is my <...
1
vote
0answers
27 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 ...
0
votes
0answers
18 views

OpenGL ES 3.0 - Uniform Buffer Object non-static indexing

I've encountered a very strange issue while testing UBO on Android device: if I try to index UBO array with non-constant index, the program fails to link with log: ...
1
vote
1answer
121 views

Correct normal map for rotated sprites

I am trying to find the best way to correctly do normal mapping in a 2D batched sprite renderer. For each sprite sheet (aka texture atlas) I render all sprites as a textured quads with a single <...
6
votes
1answer
149 views

OpenGL self-test in a mobile game

I've made an Android game that uses no/custom game engine. It renders using OpenGL ES 2.0 and optionally uses some extensions for optimization or extra effects. Over the time I have dealt with various ...
0
votes
1answer
84 views

GLSL - Stencil buffer - instanced geometry

I have geometry that have attached some "ID" data. I have generated stencil buffer, that holds these IDs. Now, in second pass, I render different geometry, but this time I need to mask it with ...
1
vote
1answer
84 views

How can I port my Gear VR app (Java, OpenGL ES) to Unity?

I want to port my Gear VR app (created in Java using the official framework) to Unity, so I can also support Microsoft's new-ish VR headsets (not talking about the Hololens!). In my current app I'm ...
0
votes
2answers
148 views

Android: 2d scrolling background

I am a very beginner in game development. All I want to achieve in the beginning is a free scrollable background like in a strategy game with my custom graphics. In my case it is supposed to be a 2d ...
0
votes
1answer
162 views

Most efficient way of drawing a lot of cubes OpenGL ES

I have to draw a lot of cubes in my OpenGL programme for android. All the cubes have the same size but different colors. I know that calling glDrawArrays is expensive operation so I should call it ...
5
votes
1answer
69 views

How can I simulate a crash of OpenGL in GLKViewController to help track down a user's problem?

I am using GLKViewController for iOS app. On some devices, there are problems (possibly with OpenGL), that I am unable to solve, because I dont see this problem on ...
0
votes
3answers
511 views

OpenGL ES 2.0 Shadow Mapping - depth only FBO not working due to GL_FRAMEBUFFER_INCOMPLETE_ATTACHMEN

I am trying to add simple shadow mapping to my friends gles 2.0 app. It is based on gles 2.0 and PowerVR SDK. The problem I encounter is that FBO is not valid due to ...
1
vote
0answers
62 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
137 views

Is Opengl 2.x still usable? [closed]

i've used opengl core profile for a while now and i was wondering if it was possible to create a "decent" application (like a game/game engine) with good graphics. I have a machine which can run only ...
0
votes
1answer
154 views

GLfloat vs GLfixed vs GLint performance in 2017

Some people claim that floats should be used for rendering vertices in modern graphics cards, because graphics cards are optimized for floating-point arithmetic and therefore, integer calculations are ...
1
vote
1answer
133 views

OpenGL ES 1.1: Is it more efficient to use glClear or use glDrawArrays with primitives that render over used frames?

For example, if I have several figures rendered over a black background, is it more efficient to call glClear(GL_COLOR_BUFFER_BIT) each frame, or render black triangles over artifacts from the past ...
0
votes
1answer
2k views

OpenGL calculate UV sphere vertices

I am trying to implement a class Sphere in C++. Therefore I want to calculate the vertices in the constructor of the class (or in a seperate function..). Although ...
0
votes
1answer
33 views

Should I draw a button using a single shape (triangle list) and draw call, or multiple shapes and draw calls (triangle strip and line lists)?

I know this is too simple for performance improvements to make much of a difference, but I find that knowing this information would be simple for many future scenarios. Basically, what I am trying to ...
-2
votes
1answer
515 views

Shader FloodFill Alogrithm

I'm new to openGL and shaders. Is there a way to implement shader algorithms for floodfills? Basically, I have a picture with outlines and i want to fill the insides of where the user touches it
0
votes
0answers
64 views

How can I fix my Gaussian blur shader? [duplicate]

With the code below I get this blurred image, which is not satisfying: But. How to get something like this? ...
1
vote
1answer
85 views

OpenGL Is High Efficiency For Large Number of Vertices Necessarily Highly Efficient For Low Numbers of Vertices

To test my program, I rendered hundreds of times more vertices than the program will ever actually have (about 5000 vertices total for the exaggerated version). The exaggerated program lagged when ...
1
vote
2answers
77 views

No perfomance gain on LIBGDX GLES with sampler2D[]

I'm trying to render 3 textures 400 times (first,second,third 400 times). I use vertex shader that takes attribute tex_id; - this is the id of texture to use. In fragment shader i have sampler2D ...
2
votes
2answers
352 views

How reliable is glLineWidth() for parameters greater than 1?

It says in the OpenGL ES specification that glLineWidth is only required to support values up to 1, but how many OpenGL drivers actually keep this function at the ...
1
vote
1answer
41 views

Opengl Es 1.1 Setting Different Transformations For Different Parts of Array

I have the following code: ...
1
vote
1answer
40 views

Would directly modifying vertex array be a good idea in 2D?

I'm currently using opengl es 1.1 for simple 2D drawing and I was wondering if it would actually be inefficient to use the opengl transform functions (since using matrix operations to move a square ...
1
vote
0answers
74 views

Acceptable memory size consumed by mobile game in 2017? [closed]

How do you think, what is the acceptable memory size consumed by mobile game in 2017, taking into account current state of mobile devices hardware performance? I've made a pack of optimizations using ...
2
votes
0answers
368 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, ...
1
vote
1answer
79 views

Edit Part of a Texture

Lets suppose that I have a large, 2048 by 2048 pixel texture uploaded to the GPU. I'd like to occasionally be able to edit parts of it, e.g. a 64x64 area. Re-uploading the entire texture would be a ...
1
vote
0answers
597 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
1answer
535 views

Playstation 4 OpenGL ES support (or Xbox)

I know that the Playstation 3 supported at least OpenGL ES 1.0, and the Vita OpenGL ES 2.0. But what about the Playstation 4 (and/or the new PS4 Pro)? Does anyone know for certain if it has native ...
0
votes
0answers
155 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 ...
1
vote
1answer
464 views

GL_CLAMP_TO_BORDER - OpenGL ES 3

W want to use GL_CLAMP_TO_BORDER in my GL ES 3 app. Based on documentation (https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml), it ...
0
votes
1answer
353 views

Aligning a weapon model with a first-person camera

The tools I am using are: gcc, opengl es 2 and glm. I am trying to align a weapon model with the first-person camera. The main issue is that I can not seem to figure out how to "anchor the weapon to ...
0
votes
1answer
164 views

glsl Expected token ')', found 'identifier' with function mix

I have a Fragment shader that contains: [...] float c = texture2D(tex, tc).a; float alpha = mix(0.0f, 1.0f, c); gl_FragColor = vec4(1, 1, 1, alpha) * color; ...