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

learn more… | top users | synonyms

0
votes
0answers
9 views

Barycentric vertex coordinates in GLES 2.0

I have a certain set of polygons, which are stored in a vertex buffer and an index buffer. The polygons are textureless and normalless. The polygons are dynamic, their buffers get constantly emptied ...
0
votes
1answer
20 views

Java Buffers and OpenGL ES 2.0 (Android)

I've been trying to come up with a good solution for preloading textures asynchronously, but in Android with OpenGL ES you cannot create a texture out of context. Would the proper solution be to load ...
0
votes
0answers
52 views

Perfect game loop [closed]

I've been working on development for an android game, and this is the game loop I have so far: @Override public void onDrawFrame(GL10 unused) { // Use this structure to set constant dt on a ...
1
vote
1answer
37 views

Replace each white spot of image to radial gradient

Recently, I have read article about sun shader (XNA Sun Shader) and decided to implement it using OpenGL ES 2.0. But I faced with a problem connected with shader: I have two textures, one of them is ...
0
votes
0answers
26 views

Android - OpenGL ES 2 - Cube with different texture in each side

I need to create a 3d cube, with a different texture on each side. Here is my cube class, which my other classes extend: import java.nio.ByteBuffer; import java.nio.ByteOrder; import ...
0
votes
2answers
189 views

How to change from 60FPS to 30FPS while keeping things smooth?

Here is my current game loop: final int ticksPerSecond = 60; final int skipTicks = (1000 / ticksPerSecond); float dt = 1f/ticksPerSecond; while(System.currentTimeMillis() > nextGameTick ...
0
votes
0answers
55 views

Vsync and Gameloops

I was about to publish my app but I tested it on a cheap Android tablet. It's anew tablet, but a cheap / low spec one. The game runs, but is pretty choppy. I'm made a discovery that quite surprised ...
1
vote
3answers
166 views

Reducing APK File Size by using JPG instead of PNG for game background images

I've just finished my (openGL ES 2.0 Android) game and it's almost ready for Alpha-testing. When I export the application to an APK File, the file is taking up 16MB and I would like to reduce this as ...
1
vote
2answers
88 views

Bad pixels on shader when loading cached binary programs

I have been trying to cache binary shader programs in my game and load them accordingly using "glGetProgramBinaryOES" and "glProgramBinaryOES" respectively. I was successfully able to cache and load ...
1
vote
1answer
29 views

XY Location scaling with varying density screens

I have a phone with resolution H=1280,W=720,Density=2 I have a tablet with resolution H=1216,W=800,Density=1.331 I drew a rectangle on my phone with corners Left,Top (-1.6,1.55), Right,Bottom ...
0
votes
0answers
43 views

Camera movement in Super Hexagon

I do realize there is no camera in OpenGL ES 2, but from my understanding you can simulate one using view and projection matrices. I'm using Android, by the way. Here's a video of the game, in case ...
0
votes
1answer
83 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
2answers
36 views

How to obtain the currently bound texture ID in an openGL ES 2.0 project

In my game, I have: GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texID); Where texID is an integer returned by my setTexture() method. Let's say, in this instance it's 1. When I bind my textures ...
0
votes
0answers
30 views

Scaling issues with Open GL viewport / scissor box (Trying to draw outside of viewport)

In my game I am currently scaling the viewport so it retains the ratio of my development device like so: width = (int) Math.min(deviceWidth, deviceHeight * 1.702127659574468); //1.702127659574468 is ...
0
votes
0answers
32 views

Export Blender 3D animation to be played by Android OpenGLES

Below code snippet shows the way to export coordinate of bones: def export_bone_matrix(armature, bone, label, file_handler): SystemMatrix = Matrix.Scale(-1, 4, Vector((0, 0, 1))) * ...
0
votes
2answers
79 views

Confusion over GLViewport

I'm hoping someone can help me understand the GLViewport and what happens when we resize it This will illustrate my confusion.... So, here I have a quad stuck in the middle of the screen. If I ...
8
votes
1answer
107 views

How can I reliably implement GPU skinning in Android?

I'm trying to get character skinning working on Android. The idea is quite vanilla: I have my skinning matrices, and along with each vertex, I send up to four matrix indices and four corresponding ...
0
votes
0answers
30 views

Deleteing Textures in Android OpenGL ES 2.0

I'm confused about how to delete a previously applied texture. So, I've applied my texture and am happily rendering it. I decide I want to delete the texture, so this is what I've tried...... void ...
0
votes
1answer
39 views

Storing object position and rotation

I only superficially understand the idea and I can't find any thorough explanation (partially because I can't find very good keywords to Google - English is not my first language): Although I ...
1
vote
1answer
87 views

Drawing flaming letters in 3D with OpenGL ES 2.0

I am a bit confused about how to achieve this. What I want is to "draw with flames". I have achieved this with textures successfully, but now my concern is about doing this with particles to achieve ...
0
votes
0answers
41 views

Very basic OpenGL ES 2 error

This is an incredibly simple shader, yet I'm having a lot of trouble understanding what's wrong with it. I'm trying to send a float to my fragment shader. Its purpose is to adjust the alpha of the ...
7
votes
1answer
181 views

How do I reconfigure my GLES frame buffer after a rotation?

Note: In order to keep the question as simple as possible, I am actively changing the body of the question to reflect the current state of affairs, instead of adding stuff at the bottom. I am ...
0
votes
0answers
54 views

Displaying and updating score in Android (OpenGL ES 2)

I'm using a FrameLayout where I have a GLSurfaceView at the bottom and a few Views on top of it. One of those Views is a TextView that displays the current score. Here's how I'm updating the score ...
0
votes
1answer
47 views

glGetActiveAttrib on Android NDK

In my code-base I need to link the vertex declarations from a mesh to the attributes of a shader. To do this I retrieve all the attribute names after linking the shader. I use the following code (with ...
0
votes
1answer
113 views

Progress bar in Super Hexagon using OpenGL ES 2 (Android)

I'm wondering how the progress bar in Super Hexagon was made. (see image, top left) Actually I am not very sure how to implement a progress bar at all using OpenGL ES 2 on Android, but I am asking ...
0
votes
2answers
95 views

OpenGL 2.0 - How to swap buffers for color picking

I'm trying to reproduce color picking on iOS, following the technique described here: http://www.lighthouse3d.com/opengl/picking/index.php3?openglway2, with OpenGL ES 2.0. When the user touches the ...
1
vote
1answer
76 views

Brighter pixels around area (OpenGL ES 2)

I'm trying to achieve an effect like in the image bellow. Basically I will have a 2D texture and I want a small area around a point (let's call it "light source") to be slightly better lit (i.e. be ...
1
vote
1answer
103 views

In 3D camera math, calculate what Z depth is pixel unity for a given FOV

I am working in iOS and OpenGL ES 2.0. Through trial and error I've figured out a frustum to where at a specific z depth pixels drawn are 1 to 1 with my source textures. So 1 pixel in my texture is ...
0
votes
0answers
57 views

Threading in Android OpenGL ES 2.0

Background I've encountered a strange issue when testing my level-select screen. I have 20 levels and display the 'select buttons' for them in 2 rows of 10 (I did this rather than display 4 rows of ...
0
votes
1answer
104 views

OpenGL ES 2 jittery camera movement

First of all, I am aware that there's no camera in OpenGL (ES 2), but from my understanding proper manipulation of the projection matrix can simulate the concept of a camera. What I'm trying to do ...
0
votes
1answer
153 views

Is ETC2 Texture Compression available in OpenGL ES 2.0?

However, 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
vote
1answer
129 views

OpenGL and atlas

I'm trying to draw element from a texture atlas with OpenGL ES 2. Currently, I'm drawing my elements using something like that in the shader: uniform mat4 uCamera; uniform mat4 uModel; attribute ...
0
votes
0answers
93 views

Moving objects smoothly, bad perfomance

I just finished developing my mini-game on Android and I got some questions about perfomance and generally "how to": If I have 25+ objects on the creeen (just a polygon with 7-8 angles) its starts to ...
1
vote
2answers
147 views

How can I read from multiple textures in an OpenGL ES 2 shader?

How can I enable more than one texture in OpenGL ES 2 so that I can sample from all of them in my shader? For example, I'm trying to read from two different textures in my shader for the player's car. ...
0
votes
1answer
115 views

Normal Map Issues

I'm experiencing a very strange result in my very simple normal map implementation on iOS 7 - OpenGL ES 2.0. I'm only using the bare parameters necessary and I'm also skipping on all the tangent and ...
1
vote
0answers
153 views

Android and OpenGL, single thread vs double thread

I'm trying to optimize my Android OpenGL ES 2.0 application, and I find myself being CPU bound. After googling, I've found this, which suggest to use a thread for updating objects, and a thread for ...
10
votes
5answers
2k views

2D collision detection

Let's assume I'm using this character. 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 is nowhere near a ...
1
vote
1answer
184 views

How should I implement a Game Over menu in Android?

By Game Over menu, I mean a menu displayed when you die, with an option to play again. I have two approaches in mind: Use OpenGL Have some button textures ready. When the character dies, draw ...
0
votes
0answers
133 views

glsl fragment shader work diffrently on different devices

i'm making a 2d android game where i have a mechanics that allow the player to move the camera away from the main character, and to not allow him to explore the hole world, a have create a Fog shader, ...
1
vote
2answers
137 views

Circular dependency when creating entities

I have the following problem: I have a a class called Stage, that keeps an list of entities, which it iterates over every update loop, and updates them. One of these entities might be a weapon (PEW ...
1
vote
0answers
135 views

iOS OpenGLES - Multithread Game loop - Render and Update

I am trying to implementing multi-threaded game loop in iOS. (Actaully, two thread - Render and Update) This is my structure. Update Loop Has logic and at the end of loop, save update state. ...
1
vote
2answers
121 views

Howdo I create differently sized texture atlases for different screen sizes?

I am beginning game development and using texture atlases. I've created textures based on the resolution 1920x1080, so I created a 1024x1024 size Texture Atlas for storing multiple graphics. If the ...
6
votes
1answer
222 views

overlapping 3d particles not blending nicely when at the same z

I'm working on a 3d particle emitter. It's going pretty good but I'm still having a problem with triangle sorting. As you can see in the photos, there are some particles that are not blending ...
1
vote
2answers
108 views

matrix to rotate a vector to a known arbitrary axis

Let's say I have a vector V (v.x,v.y,v.z) which is normalized and points somewhere in 3d space. And that I have another vector Z of (0,0,1). Knowing only these two things I'm looking for a ...
1
vote
2answers
141 views

Adding an angle variance to a 3d vector

I am converting a particle emitter from 2d to 3d. In the 2d system the original coder used a random angle variance and added it to the angle. So it would be something like: thisAngle = emitterAngle ...
5
votes
3answers
328 views

How do I send multiple matrices to a vertex shader?

I'm practising animations using bones/skinning. I am trying to send the shader one matrix per vertex. I can think of these two approaches. Method 1 I have one uniform handle for each bone matrix ...
0
votes
1answer
57 views

What is the correct Order of Operations on OpenGL 2.0 Loading Texture in condense format?

I have come across a problem when I am loading a single texture onto a single quad, and this problem persisted during the planning phases of my project, before starting my development phase. I am ...
3
votes
1answer
124 views

Texture mapping a complex object on openGL ES

I dont have much experience with openGL ES (or openGL), but i do get the general idea of texture mapping, which is each vertex should be mapped for the relevant UV coordinates of the texture we choose ...
2
votes
1answer
226 views

How do I draw an animated object in OpenGL ES?

I have a VBO, which I initialise like this (just an example): - (void)setupVBOs { GLuint vertexBuffer; glGenBuffers(1, &vertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer); ...
0
votes
2answers
125 views

Manage shader parameters

I'm making some test with OpenGL and I've got a problem with my application design. Currently, I've got something like that in pseudo code: // Ask to draw a given scene. renderer->drawScene( ...