Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.
23
votes
3answers
9k views
Workaround to losing the OpenGL context when Android pauses?
The Android documentation says:
There are situations where the EGL
rendering context will be lost. This
typically happens when device wakes up
after going to sleep. When the EGL
context is ...
15
votes
3answers
7k views
What is the difference between OpenGL ES and OpenGL?
Android uses OpenGL ES, what is the difference between it and OpenGL?
12
votes
2answers
12k views
OpenGL ES 2.0: Setting up 2D Projection
This article describes in general, how to draw sharp OpenGL 2D graphics, using fixed function pipeline.
http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL
Because OpenGL ES 2.0 has some ES 1.x ...
12
votes
1answer
743 views
Should I distribute shaders in a compiled form or in plain text?
Having an application that uses shaders that have been wrote in GLSL, what is the best strategy for the distribution in the real world and for the desktop and mobile?
I'm aiming to distribute this in ...
11
votes
5answers
5k views
Complete Math Library for use in OpenGL ES 2.0 Game?
Are you aware of a complete (or almost complete) cross platform math library for use in OpenGL ES 2.0 games?
The library should contain:
Matrix2x2, Matrix 3x3, Matrix4x4 classes
Quaternions
...
9
votes
6answers
7k views
OpenGL ES 2.0: Repository of Quality Shaders
Could I kindly ask, to suggest me a repository of high quality OpenGL (OpenGL ES 2.0) vertex and fragment shaders, please?
I am looking for pixel based ligting shaders (such as phong) and simmilar. ...
9
votes
5answers
3k views
OpenGL's matrix stack vs Hand multiplying
Which is more efficient using OpenGL's transformation stack or applying the transformations by hand.
I've often heard that you should minimize the number of state transitions in your graphics ...
9
votes
2answers
6k views
OpenGL ES 2.0 Point Sprites Size
I am trying to draw point sprites in OpenGL ES 2.0, but all my points end up with a size of 1 pixel...even when I set gl_PointSize to a high value in my vertex shader.
How can I make my point sprites ...
9
votes
3answers
1k views
Is it worth supporting iOS 3.x or iPhone 3G devices anymore when developing a game?
Is it still worth it for a game developer to try and support older devices: iPhone 3G and earlier or to support older OS: iOS 3.x and earlier?
Or is it recommended to make use of OpenGL ES 2.0 ...
8
votes
3answers
2k views
How can I bend an object in OpenGL?
Is there a way one could bend an object, like a cylinder or a plane using OpenGL?
I'm an OpenGL beginner (I'm using OpenGL ES 2.0, if that matters, although I suspect, math matters most in this case, ...
7
votes
4answers
4k views
Updating OpenGL ES 1.1 based iPhone game to use Open GL ES 2.0
I'm fairly new to anything OpenGL in general. I've made an OpenGL ES 1.1 based 2D iPhone game by working from sample code. I'm under the impression that OpenGL ES 2.0 is substantially different from ...
7
votes
2answers
1k 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
...
7
votes
1answer
342 views
How wise is this multithreading architecture?
I'm rewriting a game engine I wrote in an attempt to parallelize as much as possible. I'm considering making properties which may be accessed from multiple threads all use accessors which use boost ...
7
votes
2answers
630 views
Recording the gameplay in the game itself?
I'm presently working on a 3D car racing game for the iOS platform. I had to implement a replay system and then record that replay in a video file to upload it to YouTube.
I'm only having issues ...
7
votes
2answers
2k views
Tile map/terrain implementation with differing heights of neighbouring tiles
Ahoy!
I'm looking for some information about tile maps, or rather, what a specific type of tile map is called.
I'm interested in the kind of implementation used in rollercoaster tycoon, or the ...
7
votes
2answers
4k views
How do I use depth testing and texture transparency together in my 2.5D world?
Note: I've already found an answer (which I will post after this question) - I was just wondering if I was doing it right, or if there is a better way.
I'm making a "2.5D" isometric game using OpenGL ...
7
votes
3answers
7k views
Maya 3D model to iOS OpenGL ES
I need to display, rotate, and zoom a 3D model in OpenGL ES (iPhone/iPad). The 3D graphic artists are using Maya (on OS/X). What export format should I be looking at to use their 3D models in the ...
7
votes
1answer
5k views
Blend Modes in Cocos2D with glBlendFunc
We've been trying to replicate the most common blending modes that are available in Photoshop and Quartz 2D, but we've only come up with 3 and that's after some long searching online.
For anyone ...
6
votes
2answers
2k views
OpenGL ES 2.0: Using VBOs?
OpenGL VBOs (vertex buffer objects) have been developed to improve performance of OpenGL (OpenGL ES 2.0 in my case). The logic is that with the help of VBOs, the data does not need to be copied from ...
6
votes
4answers
2k 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 ...
6
votes
2answers
582 views
OpenGL or OpenGL ES
What should I learn? OpenGL 4.1 or OpenGL ES 2.0?
I will be developing desktop applications using Qt but I may start developing mobile applications in a few months, too. I don't know anything about ...
6
votes
3answers
536 views
Is Frustum Culling by itself enough for Consoles and Mobiles?
Software occlusion culling is often expensive, especially for smaller and older devices.
Is frustum culling alone adequate on systems that can optimally display 10k triangles at most?
If not, are ...
6
votes
1answer
426 views
Fast and simple attenuation from a flaming torch
I have a single point light-source which is a flaming torch. I compute the distance from the light accurately.
I am not trying to have a particularly realistic torch effect, but I will be moving the ...
6
votes
1answer
688 views
Adding a simple mix() destroys the framerate
I have a very simple shader and added linear fog via mix like this:
finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);
Note that the view Z distance is in the variable that also ...
6
votes
4answers
2k views
iPhone 3d Model format: .h file, .obj, or some other?
I'm beginning to write an iPhone game using OpenGL-ES and I've come across a problem with deciding what format my 3D models should be in. I've read (link escapes me at the moment) that some ...
6
votes
1answer
8k views
GLSL: How Do I cast a float into an int?
In a GLSL fragment shader I am trying to cast a float into an int. The compiler has other ideas. It complains thusly:
ERROR: 0:60: '=' : cannot convert from 'mediump float' to 'highp int'
I am ...
6
votes
3answers
261 views
OpenGL ES 1.1 - How to batch draw particles with different translations?
Assuming that I've combined all of my vertex data for many particles into a single array, how would I batch draw all of those particles in a manner that preserves their unique translations?
Any code ...
6
votes
4answers
1k views
Sprite Animation in Android with OpenGL ES
How to do a sprite animation in android using OpenGL ES?
What i have done :
Now I am able to draw a rectangle and apply my texture(Spritesheet) to it
What I need to know :
Now the rectangle shows ...
5
votes
5answers
722 views
Which version of OpenGL for Android?
I've been trying to learn OpenGL ES 2.0 to create a simple 2D game. I bought a book on android development, but after seeing that the author uses his own SDK that implements OpenGL ES 1.0 I decided to ...
5
votes
1answer
3k views
What do the components of gl_TexCoord[0] mean?
What are the differences between gl_TexCoord[0].s, gl_TexCoord[0].t gl_TexCoord[0].p and gl_TexCoord[0].x, gl_TexCoord[0].y gl_TexCoord[0].z ?
I understand that gl_TexCoord[0].x, gl_TexCoord[0].y ...
5
votes
2answers
1k views
Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?
Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?
The OpenGL ES spec says that the transpose value must be false or an INVALID_VALUE is generated. Why then have the ...
5
votes
2answers
2k views
OpenGL ES 2.0: Mixing 2D with 3D
Is it possible to mix 2D and 3D graphics in a single OpenGL ES 2.0 game, please?
I have plenty of 2D graphics in my game. The 2D graphics is represented by two triangular polygons (making up a ...
5
votes
4answers
901 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 ...
5
votes
2answers
571 views
Best way to do buttons for an OpenGL ES iPhone game
I'm making a simple 2d game in OpenGL ES and I want to add movement buttons to it. What's the best way of going about this? In previous projects I've simply added UIButtons to the view but I hear ...
5
votes
1answer
1k views
Game Code Design for Rendering
I first created a game on the iPhone and I'm now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. The Android's way is to have two threads, one ...
5
votes
2answers
746 views
Implementing fog of war in opengl es 2.0 game
Hi game development community, this is my first question here! ;)
I'm developing a tactics/strategy real time android game and I've been wondering for some time what's the best way to implement an ...
5
votes
2answers
3k views
How to decide to use OpenGL ES 1.0 or 2.0 for Android?
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
3answers
3k views
building a game for different resolution phones
I am starting some tests for building a game on the Android program.
So far everything is working and seems nice.
However I do not understand how to make sure my game looks correct on all phones as ...
5
votes
3answers
7k views
Android - Efficient way to draw tiles in OpenGL ES
I am trying to write efficient code to render a tile based map in android. I load for each tile the corresponding bitmap (just one time) and then create the according tiles. I have designed a class to ...
5
votes
1answer
373 views
OpenGL ES create stencil effect using texture
Environment
This is the environment I am working in:
OpenGL ES 2.0
iPhone Simulator & iPhone 4
iMac 27" using NVIDIA GeForce GTX 680MX 2048 MB
Hope that helps.
The Problem
Been searching ...
5
votes
1answer
4k views
OpenGL ES 2.0: Understanding Perspective Projection Matrix
Setting the Perspective projection matrix in Open GL (including OpenGL ES 2.0) has the following general format:
glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar);
Notice the ...
5
votes
1answer
883 views
How do you activate multisampling in OpenGL ES on the iPhone?
I'm experimenting w/ improving the "resolution" of an OpenGL ES based app. Apple mentions here (developer.apple.com) that OpenGL ES in iOS 4 supports multisampling... and this can improve the ...
4
votes
4answers
3k views
GLM: Euler Angles to Quaternion
I hope you know GL Mathematics (GLM) because I've got a problem, I can not break:
I have a set of Eular Angles and I need to perform smooth interpolation between them. The best way is converting them ...
4
votes
2answers
610 views
Optimising the modelview transformation in GLSL for 2D
So, the standard way to transform vertices and then pass to the fragment shader in GLSL is something like this:
uniform mat4 u_modelview;
attribute vec4 a_position;
void main() {
gl_Position = ...
4
votes
1answer
2k views
Rendering 2d sprites into a 3d world?
In opengl how do I render 2d sprites in opengl given that I have a png of the sprite? See images as an example of the effect I'd like to achieve. Also I would like to overlay weapons on the screen ...
4
votes
3answers
2k views
What is the purpose of glScissor?
I know that it is more efficient than stencil test, but am I right assuming that the same functionality could be achieved using projection transformations with viewport?
4
votes
5answers
2k views
How can I improve the “smoothness” of a 2D side-scrolling iPhone game?
I'm working on a relatively simple 2D side-scrolling iPhone game. The controls are tilt-based. I use OpenGL ES 1.1 for the graphics. The game state is updated at a rate of 30 Hz... And the drawing ...
4
votes
2answers
2k views
In OpenGL 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 depthbuffer texture. The second pass uses the values in the depth buffer to control the application of a fragment shader. ...
4
votes
1answer
220 views
Where to store shaders
I have an OpenGL renderer which has a Scene member variable. The Scene object can contain N SceneObjects. I use these SceneObjects for storing the vertex position and any transforms. My question is, ...
4
votes
1answer
656 views
Middleware to Bring 3D Meshes into OpenGL ES 2.0
Say I develop a game for mobile platform running OpenGL ES 2.0. I have done 2D part, and now I wish to import some 3D objects.
The imported 3D objects must contain the following:
Vertices positions
...