0
votes
0answers
25 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
23 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
54 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 ...
0
votes
0answers
30 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
193 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
57 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
169 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
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
2answers
39 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
35 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))) * ...
8
votes
1answer
109 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
0answers
57 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
121 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
0answers
59 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
105 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
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
0answers
157 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
185 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
135 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
139 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 ...
0
votes
1answer
251 views

libgdx game process dies on loading texture atlases

I try to load a lot of texture atlases (10) with approximately 5 (~2048x~2048)(not using PoT) .pngs each. I'm using AssetManager and there is no trouble with it on my pc but when I try it on my tablet ...
2
votes
2answers
140 views

What are the pros. and cons. of different representations a custom geometry format for a mobile based engine?

I am trying to create 3D model importer for my mobile based engine. These are what I am considering: Convert .obj file to text based structure like JSON or custom. So, basically, convert .obj ...
0
votes
0answers
99 views

OpenGL ES Renderer, how to know if onSurfaceCreated has been called?

Obvious answer is to set a boolean to true, but that wouldn't consider recreation. I'll tell you what I'm doing, and what's my problem for bringing light to the question. So, I was working on the ...
-1
votes
1answer
300 views

What's wrong with this Open GL ES 2.0. Shader?

I just can't understand this. The code works perfectly on the emulator(Which is supposed to give more problems than phones…), but when I try it on a LG-E610 it doesn't compile the vertex shader. This ...
0
votes
3answers
390 views

Android : glowing/pulsing line/triangle

I would like to create a simple Android app using Opengl ES 2.0 that is showing a simple shape (like line or triangle) that is glowing and pulsing like Nexus X logo in this video : ...
1
vote
1answer
917 views

android: How to apply pinch zoom and pan to 2D GLSurfaceView

I want to apply pinch zoom and panning effect on GLSurfaceView. It is Image editor, so It would not be 3D object. I tried to implement using these following links: ...
0
votes
1answer
457 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 ...
6
votes
2answers
289 views

Implementing realistic sun reflection on a sea

I'm drawing a 3d rendered island which has a day / night cycle and a sun that rises and sets over water. The sea is rendered with a fragment shader derived from this Blinn-Phong tutorial. ...
4
votes
1answer
155 views

GetData() error creating framebuffer [closed]

I'm currently porting a game written in C# with XNA library to Android with Monogame. I have a Texture2D and i'm trying to get an array of uint in this way: Texture2d textureDeform = ...
0
votes
1answer
122 views

Version number not supported by gl2 in andengine

I am new to andengine. From various forums, i got to know that my system should support hardware virtulisation. I have installed "Intel X86" and my system didn't throw any problem regarding "HAX" now. ...
1
vote
1answer
91 views

Orthogonal projection matrix affecting z-buffer on one device

I am experimenting using Matrix.orthoM for a isometric projection, rather than Matrix.frustumM. On one device, the z buffering does not appear to be working correctly and I get a cut away effect seen ...
-2
votes
1answer
122 views

Can't get indices with VBO working [closed]

I'm learning opengl for a few days only. Now I'm trying to use indices for my cube, but can't get it working, I don't see anything on screen. struct Vertex { GLfloat position[3]; GLfloat ...
0
votes
1answer
167 views

When to call GLBindTexture when using a spite-sheet?

Originally, I was using individual textures (ie, individual .png files) for my sprite's animation and recently altered my code so that I could put all my animation frames into 1 file (so it basically ...
1
vote
2answers
387 views

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

bHow would one go about 'flipping' a quad i.e., either horizontally or vertically? (Just a single quad, not everything in view). I know how to rotate a quad, this is my rotation method: public void ...
0
votes
1answer
299 views

ParallaxBackground AndEngine

I'm new to game development andengine. I want to add ParallaxBackground but I don't know how to change background on player move. I'm using arrow for moving a player. Now my question is where I write ...
6
votes
1answer
167 views

How to prevent clipping when moving through a tunnel?

I'm developing for Android using OpenGL ES 2.0. It's going to be a game where you have to fly through a tunnel without hitting the walls. However, the tunnel wall gets clipped as the player ...
2
votes
1answer
159 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: Quad mySprite = new Quad(); mySprite.setSize(w,h); ...
2
votes
1answer
223 views

Keeping everything within one Activity

Overview My game is currently based on a single activity (rather than multiple activities) and I would like to keep it that way. At the moment, it goes straight into the game at level 1. I will ...
0
votes
0answers
106 views

GLRenderer will not run when resuming app

I'm displaying a dialogue over my GLRenderer and then dismissing it from my Renderer's onSurfaceChanged method (once all resources have loaded and just before rendering starts) When I first run my ...
0
votes
1answer
105 views

OpenGL ES - write code in Windows

Is it possible to write application using OpenGL ES 2.0 "emulator" from AMD (AMD OpenGL ES SDK) and then use the same code (compile again, of course) in my iOS / Android / Whatever application ? The ...
1
vote
2answers
1k views

Simple Android loading screen when using OpenGL

My game uses openGL ES 2.0 on Android and it's got to the point where the pause (while loading resources) has become noticeable. All I'm after is to show a static screen (probably via an XML layout ...
0
votes
3answers
171 views

Rotating each quad in a batch separately?

Background In my app I use the following code to rotate my quad: Code //Rotate the quad Matrix.setIdentityM(mRotationMatrix, 0); Matrix.translateM(mRotationMatrix, 0, centreX, centreY, 0f); ...
1
vote
2answers
720 views

“Non-additive” alpha blending in OpenGL ES 2.0, Android (AndEngine)

I have several monochromatic sprites and I render them with alpha = 0.25 (all of them the same value). I want to "paint" with them, so when they overlap, the alpha won't be added. I am not sure if I ...
6
votes
1answer
661 views

Android game loop's effect on cpu/battery usage - unexpected results

I will try to keep this question as concise and as readable as I can. I recently came across an odd problem with my Android game that I'm developing. It's an openGL ES 2.0 game and initially I was ...
1
vote
1answer
288 views

Centering GLViewport position within physical screen

I'm developing my app on one device and want it to display at the same ratio on all other devices. Currently what I have is 'image 1' in my image below - the game fits perfectly onto my development ...
1
vote
1answer
447 views

How would one render dynamic vertices in OpenGL ES 2.0 like in a 3D modeling program?

Is there an easy way to re-render dynamic vertices in OpenGL ES 2.0 so that one could, for example, make a modeling program? I understand how to make a dynamic vertex array, but what I don't ...
0
votes
3answers
777 views

Where to run logic update in openGL ES?

Using Canvas with Surfaceview I had a run() method where I would essentially do the following: onDraw(); update(); Where onDraw method would do the rendering and update would update all my game ...