Tagged Questions

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

learn more… | top users | synonyms

1
vote
0answers
192 views

How to ensure that a 3D coordinate at Z=1 act like a 2D coordinate (using perspective projection) [duplicate]

Possible Duplicate: OpenGL ES 2.0: Mixing 2D with 3D The title probably is not that clear but please help me out here. I am going to write a (mostly) 2D game using OpenGL ES 2.0 so if I ...
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 ...
1
vote
1answer
899 views

Data Organization in Custom 3D Mesh File Format

After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game. I will need to export ...
4
votes
1answer
797 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 ...
2
votes
2answers
997 views

OpenGL ES on iOS Books

I was wondering if someone has read both the: iPhone 3D Programming And OpenGL ES 2.0 books and have an opinion if one is better than the other? I'm basically wanting to get into doing 3D ...
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 ...
3
votes
1answer
6k views

Is it possible to overlay EditText box on a GLSurfaceView on Android?

I am trying to add a "PlayerName" box on top of a opengl menu background, is this possible? I've tried various layouts, but they don't seem to allow an EditText box to appear on top What is the ...
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 ...
0
votes
1answer
919 views

OpenGL - resize texture when using cubemap

I want to resize my texture. I am using cubemap to compute reflection. I want to use this cubemap to draw skybox. Skybox is drawn but I want to resize texture down, because it is dilated. As I wrote ...
1
vote
2answers
420 views

opengl rotations for a human

I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in ...
3
votes
2answers
757 views

Faster way to scale images than gluScaleImage?

I'm porting a C++ game to Android using the NDK and there's one bottleneck that's really slowing down the code: gluScaleImage(). Does anyone know of a faster way to scale image textures?
2
votes
3answers
4k views

iPhone Open GL ES using FBX - How do I import animations from FBX into iPhone?

I've been researching this extensively. We have a game that's 90% complete, using custom game logic in iPhone 4.0. We've been asked to import a 3D model and have it animate when various events happen ...
0
votes
3answers
858 views

OpenGL ES 1.1 strange slow drawing by zooming on iPhone

I have created a view (derived from UIScrollView) where the cells are drawn and zoom occurs. Everything is drawn with OpenGL ES 1.1. Zoom is specified by adding of a calculated new distance which is ...
4
votes
2answers
772 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 = ...
2
votes
2answers
3k views

How do I create a sky box with OpenGL ES 2.0?

Can you give me hint to any good sky box example in OpenGL ES 2.0? I have found only OpenGL and does not work for me. I am doing it this way: Initialization: glUseProgram(m_programSkyBox.Program); ...
4
votes
1answer
3k views

How to create a perspective field of view matrix?

Hey, hello. I am learning a little of WebGL (OpenGL ES 2.0) through the http://learningwebgl.com tutorials, but it uses a third party library to create the View, Projection and transformation matrices ...
4
votes
2answers
578 views

How effects found in “Autodesk Fluid FX” are implemented using OpenGL ES?

How this kind of effects are technically implemented using OpenGL ES? Are they performing simulation on GPU (using Shaders) or CPU while using some smart vertex positioning and texturing? Why it ...
3
votes
1answer
2k views

irrlicht for android

I was just wondering after noticing that moblox was.built with irrlicht if there is an android port of it? Or did the dev make his own port from scratch? From my research I noticed a port project ...
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 ...
4
votes
1answer
1k views

How do I render only part of a texture to a point sprite in OpenGL ES for Android?

Using the libgdx framework, I've figured out how to render a texture to a point sprite. The problem is, it renders the entire texture to the point sprite, where I only want a small part of it (since ...
2
votes
2answers
1k views

Can one draw a cube using different method/drawing mode?

I've just started learning gamedev (in particular android EGL based) and have ran over a code from Pro Android Games 2 that looks as follows: /* * Copyright (C) 2007 Google Inc. * * Licensed ...
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 ...
8
votes
4answers
3k 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 ...
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 ...
1
vote
2answers
960 views

Disabling depth write trashes the frame buffer on some GPUs

I sometimes disable depth buffer writing via glDepthMask(GL_FALSE) during the alpha rendering of a frame. That works perfectly fine on some GPUs (like the Motorola Droid's PowerVR), but on the HTC EVO ...
5
votes
3answers
9k 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 ...
3
votes
3answers
7k views

OpenGL ES 2.0: Vertex and Fragment Shader for 2D with Transparency

Could I knindly ask for correct examples of OpenGL ES 2.0 Vertex and Fragment shader for displaying 2D textured sprites with transparency? I have fairly simple shaders that display textured polygon ...
0
votes
1answer
1k views

Formula for replicating glTexGen in OpenGL ES 2.0 GLSL

I also posted this on the main StackExchange, but this seems like a better place, but for give me for the double post if it shows up twice. I have been trying for several hours to implement a GLSL ...
2
votes
1answer
4k views

Computing a normal matrix in conjunction with gluLookAt

I have a hand-rolled camera class that converts yaw, pitch, and roll angles into a forward, side, and up vector suitable for calling gluLookAt. Using this camera class I can modify the model-view ...
2
votes
2answers
997 views

OpenGL ES 2.0: Picking Individual Polygon Sprites from within VBO

Say, I send 10 polygon pairs (one polygon pair == one 2d sprite == one rectangle == two triangles) into OpenGL ES 2.0 VBO. The 10 polygon pairs represent one animated 2D object consisting of 10 ...
8
votes
1answer
21k 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
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 ...
0
votes
1answer
3k views

How to calculate vertex normals for a mesh in Java in OpenGL ES?

Can some one point me to Java code ( in Java not C or C++) that calculates all the normals for all the vertices of a mesh for OpenGL ES application. I need this for lighting. Lets say I have a cube ...
2
votes
4answers
2k views

Setting up OpenGL camera with off-center perspective

I'm using OpenGL ES (in iOS) and am struggling with setting up a viewport with an off-center distance point. Consider a game where you have a character in the left hand side of the screen, and some ...
2
votes
1answer
288 views

Creating an alphabet with numbers in 3d using opengl-es

How should I create an alphabet with numbers in 3d in opengl-es? I'm trying to create them with the existing primitives, but it's not looking good. Do we have any alternate way to get these things ...
2
votes
2answers
4k views

OpenGL-ES: clearing the alpha of the FrameBufferObject

This question is a follow-up to Texture artifacts on iPad How does one "clear the alpha of the render texture frameBufferObject"? I've searched around here, StackOverflow and various search engines ...
3
votes
3answers
753 views

What tool should I use for drawing 2D OpenGL shapes?

I'm working on a very simple OpenGL ES 2.0 game, and I'm not sure what tool to use to create the vertex data I need. My first thought was adobe illustrator, but I can't seem to find any info on how to ...
3
votes
2answers
1k views

How to create per-vertex normals when reusing vertex data?

I am displaying a cube using a vertex buffer object (gl.ELEMENT_ARRAY_BUFFER). This allows me to specify vertex indicies, rather than having duplicate vertexes. In the case of displaying a simple ...
3
votes
2answers
560 views

Texture artifacts on iPad

I'm porting an iPhone game to the iPad. When I move textures "quickly" (5.0 pixels every update at a rate of 60 Hz) I start to see little "artifacts" or remnants of where the texture used to be. I'm ...
1
vote
1answer
618 views

OpenGL ES Loading

I want to know what is the norm of loading rendering code. Take a button. When the application is loaded, a texture is loaded which has the image of the button on it. When the button is tapped, it ...
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 ...
12
votes
5answers
9k 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 ...
2
votes
1answer
3k views

Using gluLookAt to move camera in 2D iPhone game?

I'm trying to use gluLookAt to move the camera in my iPhone game, but every time I've tried to use gluLookAt my screen just goes "blank" ( grey in this case ) I'm trying to render a simple triangle ...
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. ...
6
votes
2answers
624 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 ...
4
votes
2answers
478 views

What is the ballpark GL framerate for iPad and iPhone 4?

Does anyone the GL frame rate for iPad and iPhone 4 under the follow conditions: Unlit Non supersampled GLSL texture mapped with two textures. Single quad, 4 vertices Thanks, Doug
3
votes
1answer
2k views

Why does glGetUniformLocation report some of my uniform locations as -1?

I have been writing GLSL shaders for over a year but this is the first time I have run into this problem. I am on the iOS platform - if that matters. In a vertex shader I have this: uniform mediump ...
-3
votes
2answers
6k views

Make Pong on android using OpenGL-ES

I am trying to make a simple pong game using opengl-es. I have checked out some of the tutorials/samples, but most of them are pre-dated to 2009. I am familiar with game programming, and consider ...
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 ...
1
vote
1answer
1k views

OpenGL ES Shader help (Blending)

Earlier I required assistance getting to grips with how to retain the alpha channel of a transparent texture in my colourised texture shader program. Whilst playing with that first version of my ...