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-es2]

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

0
votes
1answer
37 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 ...
0
votes
0answers
21 views

Strange translation matrix implementation

I am developing OpenGLES 2.0 application for raspberry pi 3. I am new to both OpenGL and OpenGL ES. Currently learning OpenGLES from the book called Raspberry Pi GPU Audio Video Programming by ...
0
votes
0answers
21 views

Raytracing infinite hair strand in modulo space (curly version)

I'm working on a hack for hair rendering, I basically trace modulo voxel to get infinite grid intersection. It's basically a division from the entry point to the hair center using the delta of the ...
0
votes
0answers
18 views

Migrating from Opengles2 to 3

I'm using Ogre 1.9 and I've ported to use OpenGLES3, I'm acquiring pictures from ARKit which has two planes YUV one for luminance and one for chrome. The luminance is just working with no color image. ...
1
vote
0answers
26 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 ...
0
votes
1answer
65 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
0answers
27 views

Class initialization disrupts my OpenGL context and I am unable to render anything after

I have OpenGL context setup successfully, and I can draw textures on screen, but once I initialize CGEFrameRenderer (from gpu-image-library - just instantiation and calling init) I am unable to render ...
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, ...
1
vote
1answer
61 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
109 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
51 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
0answers
20 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
73 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. ...
6
votes
1answer
147 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
0answers
64 views

Multitexturing: arbitrary number of textures and UV sets

In the vein of Photoshop or After Effetcs work, our users can composite an arbitrary number of layers and drive fragment colors and opacity with the result. A layer is: either a texture or arbitrary ...
0
votes
0answers
53 views

Libgdx - Province Map

I would like to create a province map, something like in below example of Age Of Conquest: After some research i learnt that it can be done by using two images, one with graphics and second invisible ...
0
votes
0answers
21 views

Opengl ES 2: What should I do if I run out of possible element array indices?

Is there a way to reuse indices in an element array without starting another draw call (in the case that I am using GL_UNSIGNED_BYTE, for example, and I already used 255)? I'm using a repeating ...
3
votes
1answer
208 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
450 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
67 views

Choosing size of frustum based on objects

I would like to show camera frames using OpenGL and rotate the frame in 3D. The frame is placed at (0,0,-frameDepth), and will rotate about the origin. Should I decide the size of frustum based on ...
0
votes
1answer
317 views

Issues making a gradient square in glsl es 2.0, Gamemaker Studio 2.0

I made a triangle list with 4 triangles, having the middle point a different color. And then aim to combine the triangles to get a nice gradient. But the edges of the triangles create unwanted lines, ...
1
vote
1answer
38 views

glVertexAttribPointer alters completely different shader program

My program contains two shader programs in it. The following code is for preparing one of the shader program's attributes: ...
-2
votes
2answers
89 views

Estimated cost of calling glAttachShader() and glUseProgram()

My program doesn't contain many vertices (about 200 vertices total, and all are animated), and I was wondering if it would be worth it to create two different sets of fragment and vertex shaders -- ...
0
votes
1answer
140 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 ...
0
votes
1answer
32 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 ...
0
votes
1answer
34 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) ...
1
vote
1answer
87 views

Strange gpu glitch

I've recently tried to run my game in a new hardware (arm a17 processor, Mali-T760) and the result is quite bad, as you can see in the images below seems that the polygon's coordinates are clamped to ...
2
votes
2answers
214 views

IOS very simple 2d engine/api rendering showdown [closed]

So after taking some time running through a course, I believe I have enough experience with referring back to the course how to make the game I wish to all apart from one thing. How to draw the game ...
0
votes
1answer
281 views

Unpacking Sprite Sheet Into 2D Texture Array

I am using WebGL 2. A tag for it does not exist but it should. I have a 10x10 sprite sheet of squares that are 16x16 pixels in size (all in one PNG image). I'd like to create a 2D texture array out ...
1
vote
1answer
120 views

Can ANGLE OpenGL ES 2.0 use the same color / depth surface as Direct3D11?

Lets just assume I have some simple OpenGL ES 2.0 code that renders a box with depth writing / testing. Is it possible to put this box in a middle of a Direct3D11 scene using angle? The MS angle ...
0
votes
1answer
44 views

What causes undefined geometry to be drawn?

I am currently using the polygonSpriteBatch of libgdx to draw triangles, rectangles and a concave polygon as border. After adding the concave polygon for the colored borders everything seems to break ...
1
vote
1answer
41 views

Perspective projection in Open GL

I am trying to convert a 3d point into a 2d point using a perspective projection. I'm new to OpenGL and may not have fully understood how this works. How exactly do I calculate the near and far values?...
0
votes
1answer
330 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
177 views

GLES2 GL_BGR undeclared?

I tried to bind a bitmap texture. This bitmap is BGR format, and I'm trying to use ...
0
votes
1answer
103 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. ...
1
vote
0answers
224 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
1answer
280 views

Texture filtering of look-up table in post process shader

I am doing post processing by drawing to an FBO and then applying a certain fragment shader when drawing the FBO's texture to the screen. I want to use a look-up table texture to apply color grading. ...
0
votes
1answer
107 views

Best way to add and remove quads in a VBO?

What's the best way to handle adding and removing 2D sprites (quads) in a VBO? I am working on a mobile board game and sometimes game pieces (represented by quads graphically) need to be added to or ...
0
votes
1answer
189 views

How to draw connecting lines in plain color? [duplicate]

Since there is no option for flat shading in OpenGL ES2, is there a workaround to disable the color interpolation when different color is being passed to each of the vertices? Update: I'm working ...
1
vote
1answer
699 views

Why is my texture wrong?

So I am creating an AR app using Vuforia, and I have found a way to read obj files and index them. But now that I finally got my model to show up, there must be something wrong with my UVs/texture ...
0
votes
1answer
225 views

OpenGLES texture coordinates in shader

Currently I'm doing an android 2D game using OpenGLES 2.0 and I noticed that my UVs never change in all of textures when rendering, like this in Java code: ...
1
vote
1answer
51 views

Help Needed with Shaders

Ok, bear with me, I am a beginner with Google Cardboard programming. What I have been doing is looking at the TreasureHunter sample app from Google's page and (with the help of documentation and other ...
1
vote
1answer
100 views

alpha test shader 'discard' operation not working - GLES2

I wrote this shader to illustare alpha test action in GLES2 (Galaxy S6). I think is not ...
0
votes
0answers
52 views

FFP Alpha Test shader - function decleration

I'm trying to use FFP_Alpha_Test RTSS from ogre on GLES2 ...
1
vote
1answer
473 views

how to make a fast fragment shader that converts intensity to saturation?

I have a simple fragment shader that looks like this: ...
0
votes
2answers
468 views

When which type of draw mode to use?

I wrote Opengl ES wrapper, and I want to know, when I should use GL_TRIANGLES, GL_TRIANGLES_FAN and GL_TRINAGLES_STRIP I read difference from OpenGL Red Book, but still doesn't understand what ...
1
vote
1answer
120 views

Indexed draw vs draw array

Lately I wondered, which draw command is faster, drawArrays or drawElements. I know difference between them, ...
1
vote
1answer
538 views

OpenGL ES 2.0 Without The Use of Shaders

While refreshing my mind on OpenGL ES, I decided to read a few of the books I brought a while back and search for some tutorials online. Whilst doing so, I came across many beginner's tutorials that ...
1
vote
1answer
48 views

Fragment shader operations before vector transformations

I feel like I'm misunderstanding how to work with vector/fragment shaders. My vector shader is as follows: ...
1
vote
0answers
430 views

Libgdx - Building dynamic 3d models with Modelbuilder/MeshPartBuilder while rendering

Context: I'm building a mobile game targeted for android with libgdx. It's an endless highscore based game. The environment/terrain is build dynamically. It's kind of a maze/wall/block terrain. I'm ...