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

learn more… | top users | synonyms

9
votes
4answers
3k views

Order independent transparency in particle system

I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because: Each particle is a point sprite in a single mesh and I can't use ...
0
votes
0answers
10 views

How can I get float values using glReadPixels? [Android NDK es3.0]

c++ code: float* data = (float*)malloc(texWidth*texHeight*sizeof(float)); // or GLfloat float* result = (float*)malloc(texWidth*texHeight*sizeof(float)); // or GLfloat for (int i = 0; i < texWidth ...
2
votes
1answer
52 views

Working around the current sad state of mobile GPU drivers

I'm working on a OpenGL ES3 app for Android: for various reasons, I decided to roll my own mini-OpenGL rendering engine. So far so good. Problem is, the GPU drivers in the mobile industry are such ...
0
votes
1answer
2k views

Rendering Texture Quad to Screen or FBO (OpenGL ES)

I need to render the texture on the iOS device's screen or a render-to-texture frame buffer object. But it does not show any texture. It's all black. (I am loading texture with image myself for ...
0
votes
2answers
38 views

Is it possible to convert vec4 to int in GLSL (using OpenGL ES)

I need GPU to do some computations, and I pass shader an int array using glTexImage2D (internal format is GL_RGBA). I use texture() to get the data, but it returns a vec4 value. Is it possible to ...
0
votes
1answer
13 views

Open GL: How to map point inside frustrum to normal device coordinates (NDC)?

I read this article http://www.songho.ca/opengl/gl_projectionmatrix.html. It's explain how calculate projection matrix coefficients. But I completely can't understand how author perform mapping from ...
0
votes
1answer
50 views

Basic vertex shader, moving

I am new in shader concepts and I am trying to implement a sprite of 8x8 in OpenGL ES. I want to move the texture in the vertex shader but I cant figure out how to this, my code may be wrong, feel ...
0
votes
0answers
62 views

Camera rotation destroy scene objects orientation

I fight with that for some time and searching internet but I don't have any answer for my problem. In few words i want to have orbiting camera on screen and objects which I want also rotate ...
0
votes
1answer
141 views

OpenGL ES respecting alpha for background but not for objects

I have a problem with the alpha of my game, maybe it is solved in another post but as I am new in OpenGl and Game developemnt I dont understand most of the vocabulary and cant find a solution. The ...
2
votes
1answer
67 views

Is it possible to completely avoid copying image data when uploading textures to the GPU on iOS?

I am not a game developer, but I have been doing iOS software engineering for many years. I have a particular interest in graphics and animation, but the finer details are still a little foreign to ...
1
vote
1answer
102 views

Bad performance using VBO with OpenGL ES in Android

I'm making an Android app and I need to draw some polygons using OpenGL ES. I'm able to render them but I'm disappointed with performance. I updated the code to use VBO but I didn't notice any ...
0
votes
1answer
83 views

OpenGL ES 2.0 2D-Image displaying

I have followed the official OpenGL ES tutorial to create a working OpenGL-environment. I have been able to do anything I wanted to except for displaying 2D-images. To do so I worked through this ...
2
votes
1answer
219 views

How do I draw a circular portion of a texture within LibGDX using an OpenGL ES shader?

What is the simplest way to implement a shader to draw a circular portion of a full screen texture where the circle is dynamically resized as part of an animation using LibGDX? Is a shader even the ...
1
vote
1answer
63 views

Does glScissor affect stencil and depth buffer operations?

I know glScissor() affects glColorMask() and glDepthMask(), but does it affect the stencil and depth buffers? For example: glEnable(GL_DEPTH_TEST); glEnable(GL_SCISSOR_TEST); ...
1
vote
2answers
629 views

Decoupling rendering pipeline (for UI responsiveness): Multithreading and multiple contexts?

Warning! Wall of text (see <TL;DR> paragraphs below for short version) I have been noticing something in quite many games (most recently in cutting-edge RTS games such as Uber Entertainment's ...
0
votes
1answer
56 views

OpenGL ES 1.0 to OpenGL ES 2.0, I cant draw a square

I am learning open GL ES 2.0 and I just made 1 easy game for 1.0 I am following tutorials but I cant understand this thing In OpenGL ES 1.0 if I define a square that way: private float[] vertices = ...
3
votes
0answers
77 views

Does anyone know what technique was used in Minecraft to create shadows? [closed]

Specifically I want to know the technique used to render shadows under animals and players. I would like to create shadows like that for my own block game but I don't even know what to google. Any ...
6
votes
1answer
1k 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 ...
0
votes
3answers
570 views

How do I “reset” the color in OpenGl ES 1.0/1.1?

In my 2D game I use glColor4f() to set the color and draw my screen border rectangles but when I try to start drawing my game objects, made up of a texture on a rectangular "quad", using ...
0
votes
1answer
162 views

how to retain the animated position in opengl es 2.0

I am doing frame based animation for 300 frames in opengl es 2.0 I want a rectangle to translate by +200 pixels in X axis and also scaled up by double (2 units) in the first 100 frames Then, the ...
0
votes
1answer
92 views

How to make a stereoscopic 3D Game with SDL for iOS

I was looking up google for an answer the whole night but didn't find anything. Yesterday I found some VR demos and games on the AppStore, with stereoscopig (dual rendered) screens. So you put your ...
0
votes
1answer
88 views

OpenGL light calculation

I want to add somebasic point lights to my OpenGL application. I read here that I have to caluclate the light in a pre-projection space: Lighting can be done in any pre-projection space (e.g., ...
5
votes
1answer
3k views

How do I get smooth edges with OpenGL on Android?

Here is a screenshot that maybe makes clear what my problem is. I'm only drawing 2D circles with OpenGL. I already read the following: ...
1
vote
2answers
221 views

Problems with rendering a SkyBox

At the moment I'm writing an Android OpenGL ES 2.0 game but now I get stuck on rendering a SkyBox. Here is my (a bit simplified) code for the SkyBox: float vertices [] = ...
8
votes
2answers
4k views

In OpenGL, how can I discover the depth range of a depth buffer?

I am doing a GL multi-pass rendering app for iOS. The first pass renders to a depth buffer texture. The second pass uses the values in the depth buffer to control the application of a fragment shader. ...
1
vote
1answer
66 views

Handle vertex indicies in a vbo batch drawing call

I'm new in the OpenGL 2 world and want to render a lot of cubes (> 150.000). How can I render such kind of cubes in practise? My idea is to split the cubes to a set of vbo's (Maybe 2000 cubes per ...
7
votes
2answers
6k views

How to decide to use OpenGL ES 1.0 or 2.0 for Android? [closed]

I started learning some Android development and one of the first things I thought I could make is a simple game. However, I'm faced with one difficult question right off the bat. Should I use OpenGL ...
5
votes
5answers
3k views

Should we always prefer OpenGL ES version 2 over version 1.x

OpengGL ES version 2 goes a long way into changing the development paradigm that was established with OpenGL ES 1.x. You have shaders which you can chain together to apply varios effects/transforms to ...
1
vote
1answer
74 views

render with const depth value

This is a question that may have an answer that differs for vanilla desktop GL and GL ES 2.0 (and wishful thinking is that ES 3.0 would have the same answer as vanilla GL). What I'm doing is ...
10
votes
3answers
2k views

Missing features from WebGL and OpenGL ES

I've started using WebGL and am pleased with how easy it is to leverage my OpenGL (and by extension OpenGL ES) experience. However, my understanding is as follows: OpenGL ES is a subset of OpenGL ...
1
vote
1answer
111 views

How can I obtain information about the GPU in Cocos2d-x?

I'm trying to obtain information about the GPU that is running the game in order to use the correct texture compression for that GPU: std::string GPUInfo::getTC() { std::string TC; ...
1
vote
0answers
303 views

Libgdx implement 2d drop shadow for transparent sprites

I am a libgdx learner. For an learning application that I am developing using libgdx on android, I need to show drop shadow or glow effect when a sprite is touched. The sprites are created from a ...
2
votes
1answer
124 views

OpenGL ES Single Bitplane Texture (or something close)

I'm looking to use a texture to store single bits (or a low number of bits, two or three). This in of itself isn't hard if you're using nearest neighbor sampling with some bit plane unpacking. The ...
1
vote
0answers
121 views

How to render multiple objects as a single object for fluid simulation?

I'm trying to do fluid simulation using particles in 2d game. I have larger particles, which interactive each other physically, those particles collide with environment (e.g wall,obstacles) to ...
4
votes
2answers
533 views

Phone complains that identical GLSL struct definition differs in vert/frag programs

When I provide the following struct definition in linked frag and vert shaders, my phone (Samsung Vibrant / Android 2.2) complains that the definition differs. struct Light { mediump vec3 ...
0
votes
1answer
62 views

equivalent texture function to texture2D in OpenGL-ES?

I'm trying to figure it out how can implement the same result using texture2D. The result expected is a luminescence operation but I couldn't replicate the same functionality using texture2D for iOS. ...
1
vote
1answer
62 views

Give alpha to an object OpenGL ES

I am new on OpenGl and what I want to achieve is to give a texture the alpha from 1.0 to 0.0 I have been searching and only found "how to load alpha in images" but I cant find how to apply alpha to ...
0
votes
1answer
178 views

How to move 2D camera in OpenGL

I am new in OpenGL, I am making a game in 2D and I want the camera to follow the character. I started with gluLookAt() but I read that I could just move the matrix with glTranslatef() and It should ...
3
votes
2answers
1k views

How do I clip an image in OpenGL ES on Android?

My game involves "wiping off" an image by touch: After moving a finger over it, it looks like this: At the moment, I'm implementing it with Canvas, like this: 9Paint pTouch; 9int X = ...
0
votes
0answers
101 views

Additive blend over camera preview

I am using SurfaceTexture to draw camera preview through opengl after applying blending but new camera preview frames overwrite my previous frames although i am not clearing my color buffer. I want my ...
1
vote
0answers
269 views

OpenGL ES for Samsung 4 - no textures only white rectangles [closed]

I have Nexsus 4,Samsung 3 and several HTCs and my game works fine. When I launch on Samsung 4 I see white rectangles (empty textures), no errors, Further, my game uses sensors but I see on ...
5
votes
1answer
982 views

exporting bind and keyframe bone poses from blender to use in OpenGL

EDIT: I decided to reformulate the question in much simpler terms to see if someone can give me a hand with this. Basically, I'm exporting meshes, skeletons and actions from blender into an engine ...
0
votes
0answers
97 views

Apply android.graphics.Matrix transformation to an Open GL ES shader

I am currently using a 4x4 matrix to convert from "pixel" coordinates to OpenGL ones, my scene is full screen so my screen matrix looks like this: 2f / width, 0f, 0f, 0f, 0f, -2f / height, 0f, 0f, ...
1
vote
1answer
345 views

2D map/plane with nodes overlayed that supports panning, scaling and clicking on nodes

I'm trying my hand at Android development and seem to be running into an invisible ceiling in trying to get what I want accomplished. Basically I'm trying to create an app that renders a 2D surface ...
1
vote
0answers
69 views

Weird blending behavior on PowerVR SGX544MP2

On PowerVR SGX544MP2, sometimes blending behaves in a very strange way for me. Instead of blending with the actual color from the previous draw calls, it tries to blend with black: (sorry about the ...
3
votes
1answer
132 views

Weird texture binding bug on Mali-400 MP

On Mali-400 MP, there's a weird bug with texture binding. Sometimes, shaders use textures from wrong samplers. On other mobile and desktop GPUs, the same code works fine, but on Mali, almost every ...
1
vote
1answer
159 views

OpenGL (ES 2.0) Function Dependencies

In OpenGL (ES 2.0), there are many functions that can be called in any order, and still others that must be called after other functions had been called and not before. For example, attaching a shader ...
2
votes
1answer
302 views

Total Texture memory size iOS / OpenGL ES

My team is running into an issue where the amount of texture memory allocated via the glTexImage2D is high enough that it crashes the app ( at about 400 MB for iPhone 5). We're taking steps to ...
1
vote
0answers
49 views

Android OpenGLES, getting number of fragments passed depth test/Occlusion Query?

Afeter reading many blogs and searching on Internet, I did not get any sloution for getting number of fragments/pixels which are occludded or not occludded of the object on OpenGL ES3.0 Android ...
0
votes
0answers
176 views

Fixing/avoiding Z-fighting with decals OpenGL

I'm trying to draw animated flames as a decal in OpenGL (just a simple quad with an animated texture as a decal on another quad). Problem is as the camera moves away I get terrible Z-fighting in the ...