Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.

learn more… | top users | synonyms

29
votes
4answers
15k 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 ...
19
votes
3answers
12k views

What is the difference between OpenGL ES and OpenGL?

Android uses OpenGL ES, what is the difference between it and OpenGL?
13
votes
2answers
16k 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 ...
13
votes
1answer
2k 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 ...
12
votes
5answers
8k views

Complete Math Library for use in OpenGL ES 2.0 Game? [closed]

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 ...
11
votes
6answers
11k 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. ...
10
votes
2answers
9k 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
4k 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, ...
9
votes
5answers
4k 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
3answers
2k 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 ...
9
votes
2answers
6k 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 ...
9
votes
1answer
9k 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 ...
8
votes
1answer
651 views

what is world space and eye space in game development?

I'm reading a book about 3D stuff and OpenGL. The book often talks about world space and eye space. What exactly is the "world space?" Does the "eye space" mean the projection?
8
votes
1answer
6k 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 ...
8
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 ...
8
votes
2answers
791 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 ...
8
votes
2answers
4k 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 ...
8
votes
1answer
20k 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 ...
7
votes
4answers
9k 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?
7
votes
4answers
5k 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
1answer
533 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
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
2answers
2k 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 ...
7
votes
2answers
3k 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 ...
7
votes
2answers
5k 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 ...
7
votes
3answers
9k 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
2k 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 ...
7
votes
4answers
3k 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 ...
7
votes
1answer
1k views

Optimizing performance of a heavy fragment shader

I need help optimizing the following set of shaders: Vertex: precision mediump float; uniform vec2 rubyTextureSize; attribute vec4 vPosition; attribute vec2 a_TexCoordinate; varying vec2 tc; ...
6
votes
2answers
3k 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
2answers
623 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
610 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
256 views

OpenGL 2.0 - Texture animation with 'pixelated' effect

I'm looking for a way to reproduce the effect I've tried to sketch in the image below with OpenGL ES 2.0. The idea is to let a drop of color fall over a cube which get filled with a kind of ...
6
votes
3answers
2k views

C++ and OpenGL ES: glDrawArrays calls are time consuming

Currently, I'm profiling my iOS. All the calls to glDrawArrays are expensive. For example, here is a screenshot of the rendering part of a particle system: As you can see, the glDrawArrays call ...
6
votes
1answer
557 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
3answers
4k 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 ...
6
votes
1answer
1k 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
1k views

OpenGL ES 2.0 Best Practices / Architecture Guide

I've recently started working with OpenGL (ES 2.0) on the Android. While there is lots of documentation about the basics, I can't seem to find much about the overall architecture of OpenGL. In ...
6
votes
1answer
576 views

OpenGL ES object rotation around z axis

I have an object on my screen which is presented rotated and panned, But i have 2 problems regarding the z axis rotations. It's a bit tricky to explain so i uploaded 2 videos to describe each problem. ...
5
votes
5answers
981 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
4answers
4k views

Geometry instancing in OpenGL ES 2.0

I am planning to do geometry instancing in OpenGL ES 2.0 Basically I plan to render the same geometry(a chair) maybe 1000 times in my scene. What is the best way to do this in OpenGL ES 2.0? I am ...
5
votes
1answer
287 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, ...
5
votes
2answers
3k 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. ...
5
votes
4answers
2k 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
3answers
13k views

glTranslate, how exactly does it work?

I have some trouble understanding how does glTranslate work. At first I thought it would just simply add values to axis to do the transformation. However then I have created two objects that would ...
5
votes
2answers
775 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
2k 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
2k 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
1k views

OpenGL 3.0+ framebuffer to texture/images

I need a way to capture what is rendered on screen, i have read about glReadPixels but it looks really slow. Can you suggest a more efficient or just an alternative way for just copying what is ...