Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.
1
vote
1answer
1k views
OpenGL ES 2.0: Converting GL_TRIANGLES into GL_TRIANGLE_STRIP
I export my 3D geometry from a 3D authoring application. It is possible to export the vertex coordinates as full triangle arrays.
On ther other hand, triangle strips are more efficient for the ...
1
vote
1answer
3k views
OpenGL ES 2.0: Moving Camera in Orthogonal (2D) Projection
I have quite large 2D game scene. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene.
...
2
votes
2answers
883 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 ...
1
vote
0answers
191 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 ...
4
votes
1answer
655 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
778 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
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 ...
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 ...
0
votes
1answer
725 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 ...
3
votes
2answers
595 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?
1
vote
2answers
359 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 ...
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 = ...
3
votes
1answer
2k 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
478 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 ...
1
vote
2answers
715 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 ...
3
votes
2answers
1k views
polygon triangulation algorithm
I need to triangulated a polygon for rendering in opengl es on android ( no glu triangulation available)
Is there an already known algorithm for this? The polygon can be convex or concave (with no ...
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
884 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 ...
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 ...
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 ...
2
votes
1answer
3k 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 ...
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 ...
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 ...
2
votes
2answers
2k 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
2answers
484 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 ...
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 ...
2
votes
1answer
254 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 ...
3
votes
2answers
952 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 ...
1
vote
1answer
515 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
...
2
votes
1answer
2k 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 ...
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. ...
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 ...
-3
votes
2answers
4k 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 ...
4
votes
2answers
448 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
2
votes
1answer
1k 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 ...
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 ...
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 ...
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?
2
votes
1answer
2k views
Drawing polygons with a repeating texture on iOS
I want to draw a terrain for a 2d game, and this terrain is defined by some rotated rectangles and circles, I want to draw my terrain as if it was a repeating texture clipped by those forms. I already ...
1
vote
2answers
2k views
how disable texture after drawing an object?
i try to make a textured object then draw other without (only colored).
i had tried to play with glEnable/Disable(GL10.GL_TEXTURE_2D) , ...
4
votes
1answer
366 views
Spriting engine on mobile platforms, OpenGLES
I'm writing a basic spriting engine for a blackberry app, and I want to know the best way to draw tons of sprites using the glDrawArrays() command.
We have several sprites that move around the ...
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 ...
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 ...
3
votes
2answers
1k views
how to apply a texture to a 3d scene background?
i don't really know the exact term for that (i thought it was hdr but no...).
i want to put a texture as a background in opengl-es , and when we rotate the view , the background rotate too ...
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 ...
2
votes
1answer
804 views
Post processing texture sizes
I'm trying to write some code to do post processing in OpenGL ES2 on the iPhone. All is fine an dandy, except I am having trouble working out how to scale the texture rendered in the rendering step, ...
3
votes
1answer
690 views
iPhone/OpenGL-ES partially texture mapping an object
I only have a basic understanding of OpenGL, so I'm probably showing my ignorance here.
I'm looking for a great iPhone/OpenGL-ES example of applying a texture (preferably from a texture atlas, but ...
5
votes
1answer
882 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 ...
1
vote
1answer
879 views
How can I take advantage of the iPhone 4's higher resolution screen?
I've recently tested an OpenGL ES based 2D game on the iPhone 4. I've done almost all of the development and testing so far on my 3G device. The game works fine (except for a few multitasking ...