0
votes
1answer
43 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
69 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
votes
0answers
31 views

Android — OpenGL ES 2.0 Drawn obects never appear [closed]

I've been searching for a long time about this, but never found it. My problem is: All my primitives are not appearing, i think this might be a camera related problem, but I wasn't able to fix it. ...
1
vote
0answers
81 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
1k 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
94 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
92 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
116 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
0answers
66 views

Async Task for splash screen in OpenGL project

I'm confused over the application of an asyncTask for a simple Android splashscreen. I'm talking specifically about within an OpenGL game. Because of the nature of OpenGL, 2 things spring to mind ...
0
votes
1answer
151 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
124 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
71 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
191 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
347 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
650 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
312 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
254 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
134 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
92 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
79 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
107 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
111 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
275 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
264 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
141 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
142 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
194 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
89 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
0answers
98 views

Android , why GLSurfaceview output is different in Various Devices (Google Nexux7,Samsung Galaxy Note II)

I have created an android app for drawing of lines,circles.. by using GLSurfaceView in OpenGLES 2.0 like an Auto cad app. The app works well with Google Nexus 7, in the sense that if we draw a ...
0
votes
1answer
94 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
728 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
145 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
578 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
573 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
188 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
382 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
555 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 ...
-2
votes
1answer
175 views

Game code structure using openGL / Android [closed]

My game will have 3 activities (splashscreen, options menu and main game). As it stands, each is a separate activity with it's own activity class and GLSurfaceview class. Is this structure the right ...
2
votes
1answer
508 views

Separate renderng thread in Android (OpenGL ES 2.0)

I'm used to mainly working with the Canvas SurfaceView API on Android and have recently been learning openGL ES 2.0 With canvas I know that surfaceView gives you the ability to start a new thread to ...
1
vote
1answer
280 views

Powers of 2 textures in Android 2d games?

I've read a lot about the importance of using powers of 2 png's for textures when using OpenGL ES. However, how does this relate to Google's own documentation regarding the resizing of graphics for ...
0
votes
1answer
286 views

Drawing more that one quad with only one glDrawArray call…?

Edit After initially thinking that my sprite batch test was faster than calling each sprite individually, it appears that is not the case!! :-( With a single set of GL calls for a each sprite, I can ...
2
votes
2answers
2k views

Android: Loading bitmaps without premultiplied alpha (OpenGL ES 2.0)

Is this possible? To load textures in non-premultiplied format (Straight alpha?)? My game has 1 or 2 images which have semi-transparent pixels and I need to be able to fade them in and out but this ...
2
votes
1answer
540 views

How can I tell if OpenGL has finished rendering the current frame?

If I make a call to http://developer.android.com/reference/android/opengl/GLSurfaceView.html#requestRender() from my game loop, how can I tell when OpenGL has finished rendering? I don't want to ...
0
votes
1answer
327 views

Get back or delete an existing OpenGL object, then change it and draw at new. How?

With OpenGL i'm drawing for example a circle. Can i take this drawn circle back out of the window and change something and then draw it back on the window? Or can i /have to delete it and then draw ...
7
votes
2answers
539 views

What's the best way to draw lots of trees

I'm writing an app which renders a random island planted with trees. The trees are currently two quads, criss-crossed and drawn with textures. I plan to have more complex meshes that form different ...
1
vote
2answers
228 views

Why doesn't a line draw after instantiating it on a thread other than the renderer thread?

I'm making a 2D game with OpenGL ES 2.0 on Android, as an excuse to learn a bunch of things. I'm drawing many lines to make a grid, but setting everything up takes time and I'd like to render a ...
2
votes
0answers
203 views

Camera - View matrix in Android + openGLES 2

I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly. I get the x and y coordinates of the screen and after doing some sanity ...
1
vote
0answers
260 views

Converting motionevent.getx and motionevent.gety to pixel or Object coordinates in the view

I am trying to draw buttons using OpenGL I have added a Gesture Listener for the GLSurface View now i have motionevent when ever the user touches. My question is how can i convert motionevent.getx and ...
0
votes
1answer
595 views

All of my matrix functions not working? OpenGL ES 2.0

I am trying to make a projection matrix scaling the screen and making a coordination system. For some reason I don't think any of my matrix calling is working... the 3 function I am using are ...
1
vote
1answer
155 views

Horizontal scroll only part of the view

I would like to know the best way on how to implement horizontal scrolling to only part of the view and vertical scrolling to complete view. I was able to achieve horizontal and vertical scrolling to ...