OpenGL ES 2.0 emphasizes a programmable 3D graphics pipeline (comparing to fixed-function pipeline of OpenGL ES 1.1).
0
votes
2answers
57 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
50 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
0answers
44 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
31 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
67 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
59 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
79 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
81 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
88 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
101 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
104 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
124 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
107 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
124 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
87 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 ...
1
vote
0answers
111 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
99 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 ...
5
votes
1answer
197 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
86 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
110 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
250 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
50 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
102 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
190 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
99 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( ...
1
vote
1answer
85 views
Run OpenGL shader on part of a texture
How do I run an OpenGL shader on just a portion of an off screen texture and leave the rest of the texture unmodified? Are there any calls that restrict the sampled pixels to just a rectangle or do I ...
0
votes
1answer
192 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 ...
0
votes
1answer
136 views
Should I delete the textures I use in OpenGL ES 2 (Android)?
Say I have a skybox and the user can choose out of 2 sets of 6 textures (one for each face of the cube) to use on that skybox. For example if user selects set A, I load the textures ...
2
votes
2answers
131 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 ...
5
votes
1answer
117 views
portal cutoff effect
I want a 3D Mesh to come out of a flat portal. Only the part of the mesh that's coming out of the portal should be rendered, so the mesh should be cut off or sliced until it's fully outside the ...
0
votes
1answer
98 views
Sphere turns to ellipsoid further away from origin (OpenGL ES 2, Android)
I'm not even sure what code to share, but maybe someone's been in a similar situation or has a good suggestion.
I'm basically rendering a sphere in the middle of the screen (placed at (0, 0, 0)) and ...
2
votes
0answers
79 views
OpenGL transparent framebuffer texture
I'm trying to implement atmospheric glow like this. It was a huge pain to get it done, since I'm new to FBO and OpenGL, but I managed to do something similar to what the OP wanted.
I followed his ...
1
vote
1answer
180 views
iOS: OpenGL ES 2.0 render texture with glScissor performance
I have drawn image with OpenGL and will redraw tile of its texture (non filled area).
Which case will work faster?
Set glViewport with full texture's rect, draw full texture and use glScissor ...
0
votes
1answer
157 views
OpenGL ES, orthopgraphics projection and viewport
I want to make some simple 2D game on iOS to familiarize myself with OpenGL ES.
I started with Ray Wenderlich tutorial (How To Create A Simple 2D iPhone Game with OpenGL ES 2.0 and GLKit). That ...
3
votes
0answers
44 views
Using GLES 2.0 producing a blank screen after the game is quit in LibGDX [closed]
I am making a 2D tile based game in LibGDX. I am using Scene2D Stage in my Screens. I am also using GLES2.0 in my game. When I changed from GL10 to GL20. On pressing the back button, my game is ...
0
votes
1answer
410 views
Rotation about a point in OpenGL ES 2 (Android)
I'm trying to implement rotation about a point (the origin) using quaternions. My camera is at (0, 0, 3). I'm applying all the operations to the view matrix. Basically my rotation is at the moment not ...
0
votes
1answer
69 views
Unit conversion for physics
I'm doing the physics for a 2D game which visuals are represented in openGl. Gravity is 9,8 m/s^2, how do i convert that to my screen size? OpenGl sets width to -1 to 1, and does aspect ratio of the ...
0
votes
0answers
159 views
How to create a shining sun in OpenGL ES 2 (on Android)
Let's say I created a space scene in OpenGL ES 2 similar to this one:
At the moment my sun is just a small texture similar to the one in the image that I place somewhere far, but it obviously looks ...
0
votes
1answer
87 views
Particles placed in the middle of the screen (OpenGL ES 2 / Android)
It seems like each of my particles is placed at (0, 0, 0) even though I'm setting different positions for each of them (debugger also confirms this). It must be something really silly that I'm ...
1
vote
2answers
124 views
How can I handle shadowing of a planet's rings by the planet itself?
I assume the most straightforward way to draw planetary rings (such as those around Saturn) is to use a texture that is transparent everywhere except for the rings, and then place the planet in the ...
0
votes
1answer
153 views
Swaying tree in OpenGL ES 2
I've seen this many times, but I have no idea what's the best way to achieve it. I am looking for something close to, for example, this: Lonely Tree Live Wallpaper
I have two approaches in mind: one ...
0
votes
0answers
83 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 ...
0
votes
0answers
44 views
Create quad from texture and screen metrics
If I have a texture with known metrics (pixel size, byte type) and a GL surface to render to of a know density and measures, and I want to draw a quad composed of two triangles that correspond to the ...
0
votes
1answer
198 views
Android OpenGL ES 2 framebuffer not working properly
I'm trying to understand how framebuffers work. In order to achieve that, I want to draw a very basic triangle to a framebuffer texture and then draw the resulting texture to a quad on the default ...
1
vote
1answer
124 views
Fragment shader seems to floor() imprecisely
I'm trying to interpolate coordinates in my fragment shader. Unfortunately if close to the upper edge the interpolated value of fVertexInteger seems to be rounded up instead of beeing floored. This ...
-1
votes
1answer
224 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
361 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
719 views
OpenGL ES 2.0. Sprite Sheet Animation
I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0.
I would work it out by loading the texture and use a matrix on the vertex shader to move ...
0
votes
1answer
128 views
Drawing a random x,y grid of objects within a prespective
I'm wrapping my head around OpenGL ES 2.0 and I think I'm trying to do something very simple, but I think the math may be eluding me.
I created a simple, flat-ish cylinder in Blender that is 2 units ...