Questions tagged [opengl-es2]

OpenGL ES 2.0 emphasizes a programmable 3D graphics pipeline (comparing to fixed-function pipeline of OpenGL ES 1.1).

Filter by
Sorted by
Tagged with
1
vote
1answer
371 views

Problem with 2D game on android. Random FPS drop with OpenGLES 2.0, sudden white screen with Vulkan

I'm having a problem with my 2D game on Android. When I use OpenGLES 2.0 as the graphics API, I experience sudden FPS drops in the game. The game starts to slow down sometimes randomly, And it can ...
10
votes
2answers
16k views

Taking advantage of multithreading between game loop and openGL

Talking in context of a game based on openGL renderer : Let's assume there are two threads : Updates the game logic and physics etc. for the in game objects Makes openGL draw calls for each game ...
0
votes
0answers
22 views

Can frame buffer objects in openGL ES have different kinds of attachments?

This question is with regards to the QT openGL app presented in this repository https://github.com/PRBonn/semantic_suma I am trying to run this application on NVIDIA AGX Xavier, however, I am getting ...
1
vote
1answer
83 views

Why do I have additional glBindBuffer() calls?

I have a OpenGL2/OpenGLES2 application and it among others renders a sphere using the following pseudocode: Update vertices data on CPU call glBufferSubData(GL_ARRAY_BUFFER, ...) to update them on ...
1
vote
0answers
47 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 ...
0
votes
1answer
231 views

Billboard quad in same draw call?

I am currently drawing a isometric world in 3D, meaning the floors and walls are all quads aligned to the original axis in the world and using a rotated orthogonal camera to "distort" the images into ...
0
votes
1answer
59 views

Android - Google play - enable download app for devices that supports opengl extension

I am using OpenGL ES 2 in my game. However, for simplicity i have used some extensions like VAO. Is there a way, how to disable dowloading of my app for devices, that do not support this (and other) ...
3
votes
3answers
2k views

OpenGL are strips/fans faster for rendering or just data bandwidth

When we send data for drawing we can mark it as TRIANGLE_STRIP or TRIANGLE_FAN to reduce the number of vertices we have to specify. Now, does this actually improve the rendering speed on the graphics ...
0
votes
1answer
29 views

Proper way to supply different textures and multiply matrices for thousand of terrain meshes

What I have Terrain chunks of size 64x64 meters in a custom format PVR textures OpenGLES2 renderer GLSL shader None of the above can be changed in any way, i.e. I can't modify the existing code of ...
1
vote
0answers
148 views

Godot speed up mobile HTML5 Export GLES2 load time

I got a small Godot project that should be played on mobile devices, however the load time of a GLES2/ HTML5 export project of Godot takes 20+ seconds to load from the server. To decrease the load ...
2
votes
1answer
301 views

Godot 3.1.2: Black lines / borders around Sprite

In Godot 3.1.2 using OpenGL ES2, black borders/ lines seem to form around some sprites I have imported. Usually they appear on top of the sprite but can also "border" around it. Being new to Godot ...
3
votes
1answer
135 views

Removing texture wrapping artifacts in OpenGLES

I'm drawing an 2D array of cubes in 3D space using OpenGLES. The texture that I have bound is spritesheet-style; that is, it's multiple textures packed into one. If you look closely at the front of ...
1
vote
2answers
4k views

Is ETC2 Texture Compression available in OpenGL ES 2.0?

I have an ES 2.0 app and would like to use ETC2 texture compression if it is available (i.e. I am running on a device that supports ES 3.0 standard). Is it possible to use ETC2 in ES 1.1/2.0, and if ...
0
votes
0answers
20 views

How to debug shaders running on Android 4.x devices?

I have tried some of the existing inspectors such as RenderDoc and gapid, but none of them can be used with Android 4.x. Latest version of gapid requires Android 6.0 and RenderDoc requires Android 5.0....
1
vote
1answer
318 views

Puting all vertex attributes of a scene into a single VBO

I'm rendering various elements in OpenGL ES 2 on Android, and I'd like to pack the vertex attributes of the whole scene into a single vertex buffer object (VBO). My question is, if these objects have ...
1
vote
1answer
64 views

OpenGL strange depth test behavior

I have a simple OpenGL program that renders terrain with a texture. It exhibits some strange behaviors (see video) that look similar to depth test issues. However, I have already enabled depth test. ...
5
votes
1answer
2k views

OpenGL ES 2.0 texture distortion on large geometry

OpenGL ES 2.0 has serious precision issues with texture sampling - I've seen topics with a similar problem, but I haven't seen a real solution to this "distorted OpenGL ES 2.0 texture" problem yet. ...
0
votes
1answer
110 views

Concerns about how to efficiently implement sprite atlas

I currently transform (translate, rotate, scale) a bunch of vertices in my own Java code, then populate an mPositions array and an ...
0
votes
1answer
227 views

How to keep track of (count) vertices processed so far in GL ES SL 2.0 vertex shader?

I'm trying to learn how to use GLSL ES 2.0. In OpenGL ES 2.0, there is no gl_VertexID keyword to obtain the number of vertices processed so far. So I was wondering ...
1
vote
1answer
985 views

How do I draw multiple irregular polygons with OpenGL ES?

In this post I was asking how to program a map of a Risk-like game. Now that the map is pretty coded, both client and server-side, I'd like to finally draw the map. I'll try to keep least broad as ...
2
votes
1answer
850 views

How to know when Android OpenGL Context has been preserved?

I am implementing a pause menu for my game in Android. If the activity pauses and then resumes, it loses the OpenGL context. However, if you use ...
20
votes
5answers
13k views

Is deferred rendering/shading possible with OpenGL ES 2.0 ?

I asked this on StackOverflow, but it might make more sense here: Has anyone implemented deferred rendering/shading under OpenGL ES 2.0? It doesn't support MRTs, so with only one color buffer, it's ...
2
votes
2answers
873 views

Convert triangle mesh to group of line segments

I have a 3D .OBJ model file that is loaded in my OpenGL ES 2 Android application using ASSIMP library. All the faces are triangulated. I want to draw the wireframe ...
2
votes
2answers
3k views

Is it possible to use unnormalized texture coordinates from a GLES2 GLSL fragment shader?

I want to look up a texel from my GLES2 GLSL fragment shader using un-normalized texture coordinates (0-w, 0-h instead of 0-1, 0-...
3
votes
0answers
142 views

How to use large texture atlases in my shaders on mobile devices

This is a frustrating discovery. I have ported my desktop game to mobile and discovered that floating point precision in my shaders is not good. I have large animations which I store per frame on a ...
11
votes
4answers
6k views

2D collision detection

Let's assume I'm using this character. (source: iconbug.com) How would you implement collision detection for it? Using a bounding box doesn't seem to be a good approximation, because the bird's shape ...
10
votes
1answer
4k views

Sprite sheet textures picking up edges of adjacent texture

I have a custom sprite routine (openGL 2.0) which uses a simple sprite sheet (my textures are arranged horizontally next to each other). So, for example, here is a test sprite sheet with 2 simple ...
1
vote
1answer
195 views

OpenGL Texture from Raw Data Not Rendering Correctly

Starting off the class in question is here: ...
11
votes
3answers
11k views

How can I bend an object in OpenGL?

Is there a way one could bend an object, like a cylinder or a plane using OpenGL? I'm an OpenGL beginner (I'm using OpenGL ES 2.0, if that matters, although I suspect, math matters most in this case, ...
7
votes
3answers
1k views

What's the best practice for a progress bar in OpenGL ES 2.0?

My attempt: I make a texture (could be a single colour or otherwise), and then stretch that texture from a minimum 0 up to a maximum ...
0
votes
1answer
69 views

Which part of the frustum sits at the eye position?

In Java I create a frustum projection matrix via Matrix.frustumM(projMatrix, 0, left, right, bottom top, near, far); and a view matrix via ...
4
votes
2answers
1k views

Generate ETC2 compressed texture from Android Bitmap in OpenGL ES 2

My app currently uses a lot of textures most of which probably could be compressed quite a lot by using ETC2 (my app runs on 4.4 so i have a lot of devices supporting GLES30), i cannot use ETC1 since ...
1
vote
0answers
50 views

Why can't I use C routines to load files in Android NDK?

I have successfully rendered a triangle with a hard coded shader using NativeActivity of Android NDK. Now I have the requirement to load a shader file. I tried to ...
16
votes
2answers
34k views

GLSL Shader - Change Hue/Saturation/Brightness

I'm trying to change the hue of an image using a GLSL fragment shader. I want to achieve something similar to Photoshop's Hue/Saturation Adjustment layer. In the following image you can see what I've ...
3
votes
2answers
2k views

How to flip a quad (openGL es 2.0 Android / Java)

How would one go about 'flipping' a quad, either horizontally or vertically? (Just a single quad, not everything in view). I know how to rotate a quad, this is my rotation method: ...
0
votes
3answers
448 views

Rotating each quad in a batch separately?

Background In my app I use the following code to rotate my quad: Code ...
2
votes
1answer
281 views

re-using objects

I'm working with openGL ES 2.0 on Android and I've created a custom Quad class. This allows me to make a sprite object like so: ...
2
votes
3answers
12k views

Mesh with quads to triangle mesh

I want to use Blender for making models yet realize some of the polygons are not triangles but contain quads or more (example: cylinder top and bottom). I could export the the mesh as a basic mesh ...
0
votes
1answer
897 views

Re-using one texture for multiple OpenGL Quads

I've been looking over my code and I'm just wondering, when I set a texture for say, 20 quads that need to use the same texture, it seems as though I'm creating a new texture each time...... surely ...
0
votes
1answer
1k views

Drawing Text on a scene

I am not sure if I am missing something but I was thinking about how text entities are drawn on a scene, are they drawn with an offset depending on the length of the text? I notice that when I add a ...
7
votes
1answer
388 views

Optimal batching for 2D objects with transparency

I have a collection of 2d objects with transparency. Each object has a depth value to determine draw order and a material. I'm trying to batch them in an optimal way to minimize draw calls. Assume ...
1
vote
1answer
249 views

GLSL shader time uniform freezed?

I have a simple fragment shader to simulate "falling water". I'm using Ogre3D and opengles2, this is my code: ...
3
votes
1answer
363 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 ...
2
votes
1answer
109 views

Texture being rendered to main frame buffer?

I'm using Ogre 1.10.12 (openglES2 as render system) to create a manual texture like this: ...
0
votes
1answer
225 views

WebGLRenderingContext.texImage2D does not implement interface ArrayBufferViewOrNull

I'm working on a WebGL project and all my textures render fine. When i wanted to implement a cubemap i started getting this type error. ...
0
votes
0answers
48 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/...
3
votes
0answers
148 views

Game Maker Studio 2, Shaders not working as intended in webbrowsers on mac

The shader output of my html5 game in Game Maker Studio 2 looks wrong on webbrowsers on MacOS. Sometimes the shaders lack completely and at other times the shader colors look completely different. ...
5
votes
1answer
177 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 ...
3
votes
1answer
405 views

Roads rendering over 3D terrain

I've got a 3D terrain that consists of many heightmap-based tiles. I need to render multiple roads over the tile. By now I simply subdivide road into tile pieces then generate a decal per each tile. ...
0
votes
3answers
2k 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
2 3 4 5
8