opengl-es

Learning OpenGL ES 1.x

What is the quickest way to come up to speed on OpenGL ES 1.x? Let's assume I know nothing about OpenGL (which is not entirely true, but it's been a while since I last used OpenGL). I am most interested in learning this for iPhone-related development, but I'm interested in learning how it works on other platforms as well. I've found t...

How well does the Android Phone Emulator reflect the performance?

I've been playing around with OpenGL ES development on Android. OpenGL ES applications seem to run slowly in the Emulator on my development machine. Does this reflect likely performance of actual hardware? I'm concerned about spending too much time developing an application if the graphics performance is going to be sluggish. ...

How do I create a zoom effect in OpenGLES on the iPhone?

I have an OpenGL ES game that I am hacking together. One part of it involves looking at a large "map-like" area and then double-tapping on one part to "zoom into" it. How would you use OpenGL ES to provide this effect (given that it may need to zoom in on different parts of the map). I've heard of glScale and glOrtho, but I'm uncl...

How to Implement Ocean Surface Effect Using OpenGL ES 1.1?

I'm working on an iPhone game that takes place on the ocean surface. Can someone recommend some sample code or tutorials for implementing waves or ripples in OpenGL? iPhone supports OpenGL ES 1.1, so there is no support for shaders or other fancy effects. I don't need anything too fancy. I don't need reflections, for example. I don'...

Dithering gouraud-shaded vertex-colored polygons to remove banding

I'm using OpenGL ES on a low-resolution, embedded device. I've applied a vertical color gradient, using vertex coloring, to a large polygon serving as a backdrop to my rendered scene. I can see clear visible banding artifacts in the color gradient. My main experience is using software renderers. With software renderers it is common to ...

Is there a way to import a 3D model into Android?

To all 4 Android developers out there :) Is it possible to create a simple 3D model (for example in 3DS MAX) and then import it to Android somehow? I work in Eclipse with Android plugin, if that's of any importance. If so, do you know any tutorials/resources explaining how to do it? ...

Why does my OpenGL ES iPhone game flicker when I first turn on the phone?

I made a simple game for the iPhone using OpenGL ES. Everything works fine except for this problem: I turn the phone completely off, then back on, then launch my app and I get this wierd flickering! Every other frame is correct... the incorrect frames are just the same frame over and over again. If I quit the app, launch it again eve...

Large scrolling background in OpenGL ES

Hello! I am working on a 2D scrolling game for iPhone. I have a large image background, say 480×6000 pixels, of only a part is visible (exactly one screen’s worth, 480×320 pixels). What is the best way to get such a background on the screen? Currently I have the background split into several textures (to get around the maximum texture s...

Change texture opacity in OpenGL

Hello! This is hopefully a simple question: I have an OpenGL texture and would like to be able to change its opacity, how do I do that? The texture already has an alpha channel and blending works fine, but I want to be able to decrease the opacity of the whole texture, to fade it into the background. I have fiddled with glBlendFunc, but ...

Why does calling glMatrixMode(GL_PROJECTION) give me EXC_BAD_ACCESS in an iPhone app?

I have an iphone app where I call these three functions in appDidFinishLaunching: glMatrixMode(GL_PROJECTION); glOrthof(0, rect.size.width, 0, rect.size.height, -1, 1); glMatrixMode(GL_MODELVIEW); When stepping through with the debugger I get EXC BAD ACCESS when I execute the first line. Any ideas why this is happening? Btw I have a...

Can I use indexed primitives when using vertex buffer objects in OpenGL ES 1.x?

Hi, I have an array that contains a list of vertices which I copy to the GPU using a vertex buffer object. However the vertex coordinates on their own are meaningless as I also have an integer array that contains a list of indices into the vertex array. In this scenario is it possible to create another buffer object to store the indice...

What's "in" and "out" of OpenGL-ES? (Porting from OpenGL)

It seems that all of the documentation I can find about OpenGL-ES says something to the effect of "OpenGL-ES is just like OpenGL, but without a lot of stuff. For example, there's no glBegin or glEnd." Ok, that's great. So, what ELSE isn't there any of? Or is there a list of what's in? Or maybe a porting guide? (Specifically, I'm tr...

OpenGL: How to implement an "eraser" tool?

I'm working on a game for the iPhone that has a drawing/paint mechanic involved and I'm having problems trying to create a tool that would erase things already painted. The main problem is that the background being painted on is not a solid color but a static image or animation. I've tried using different blending options and logical op...

Re-displaying EAGLView in simple iPhone game

I'm playing around with a really simple game for the iPhone based on the CrashLanding example on the developer center. I've extended it a little so that rather than using OpenGL for display all the time I have a plain UIView as the title screen, a UITableView for a high scores screen and an unmodified EAGLView for the game screen. So a...

Custom view transition in OpenGL ES

I'm trying to create a custom transition, to serve as a replacement for a default transition you would get here, for example: [self.navigationController pushViewController:someController animated:YES]; I have prepared an OpenGL-based view that performs an effect on some static texture mapped to a plane (let's say it's a copy of the fl...

opengl: how to avoid texture scaling

How do I apply a repeating texture that always maintains its original scale (1 pixel in the texture = 1 pixel on screen), regardless of the vertex data it is applied with. I realize this is not the most usual task, but is it possible to easily set opengl to do this, or do I need to apply some kind of mask to vertex data that respects it...

How do I grab an image form my EAGLLayer ?

I'm looking for way to grab the content of my opengl (as UIImage) and then save it into a file. I'm now giving glReadPixels a try though I'm ont sure I'm doing the right thing as of what kind of malloc I should be doing. I gather that on OSX it's GL_BGRA but on the iPhone that doesn't work... ...

Any one know of an OpenGL ES example of an interactive globe/earth for the iPhone.

I am looking for an example that renders an interactive earth similar to the one in the Smule products. Any help will be great even if it is just part of the solution. ...

3D effects in a 2D game using OpenGL

Hello! I am working on a 2D game using OpenGL ES. I am using the orthographic projection, since it makes the 2D stuff easy. Now I would like to create a simple 3D effect, say rotate a sprite around the Y axis (something like cover flow). If I understand things correctly, this can’t be done in the ortho projection. Is it possible to do it...

porting iPhone openGLES app to OSX?

Developing for the iPhone has been my first experience with objective-c and first in-depth experience with xcode. How difficult would it be to port an openGLES iPhone app to the OSX desktop using openGL? I am not asking about user interface - obviously there is no equivalent to cocoa touch UI on the desktop. I am asking specifically ab...