opengl-es

How do I implement a sprite-sheet in OpenGLES for iPhone?

I am working from the GLSprite sample code example. What I want to know is what do I need to do to the code to have it treat my texture as a sprite-sheet? The only modification I have done so far is to create a 256 x 256 png of 16 smaller images to be my frames. I have never worked with sprite-sheets before. Thanks for your help. ...

Is there a public specification of WebGL anywhere?

It seems the Khronos group is fairly closed when it comes to releasing early specs for WebGL to the public. Does anyone know of a resource to keep up to date on API changes? The only thing I can seem to find, short of doing a checkout of Firefox or WebKit sources, is a page from 2007 on Vladimir Vukićević's blog with a small list of Op...

Iphone open gl es application and autorelease pool

So I am creating my first opengl es application on the iphone. I want to autorelease an object and that was around the time I noticed that I can't seem to find the location of the autorelease pool. 1) Is the autorelease pool already created for me in an iphone opengl es application? 2) If it is already created for me how often is the ...

Filling the area inside of a irregular shaped polygon in opengl es

I have a set of points that outlines my polygon. The polygon can have many different shapes including convex shapes (imagine the shape of a crescent moon). I thought I could fill the inside of these shapes by using a triangle fan that started at the first point on the perimeter, but this fails badly on certain shapes. How do people ge...

How to implement a virtual D-Pad on iPhone?

I'm having trouble implementing a virtual D-pad in an EAGLView (OpenGL ES). I thought this would be simple but it is not. It is not so straightforward to determine whether a touch is on a certain portion of the D-Pad at any given time. Does anyone know of some good (relevant, please) resources online or could maybe post some source? ...

how to create something like For All Seasons app in opengl?

I have seen a free app named For All Seasons. It has very cool effects. Does someone know how we can achieve this using OpenGL or Core Graphics? ...

Android OpenGL ES + Frame Buffer Objects

Hello, We've been using Frame Buffer Objects in our application, and trying to port it to android. However it seems that the FBO extension isn't implemented in Android 1.4 (which we are using). We essentially need to render a scene to a texture, we don't need z-buffer, just general poly and texturing primatives. Any suggestions on how...

Tile-based Collision Detection problems in 2-D iPhone game

SETUP: I'm working on a 2-D tile-based game (bird's eye view) for iPhone. The app reads in a tile-d (.tbx) tilemap file of tiles with a 'blocked' property of either true or false to represent whether or not the hero can move through the tile. I iterate over each tile in the map and create a 2-dimensional C array representing tile rows an...

Will OpenGL give me any FPS improvement over CoreAnimation for scrolling a large image?

Hi, I'm considering re-writing the menu system of my iPhone app to use Open GL just to improve the smoothness of scrolling a big image (480x1900px) across the screen. I'm looking at doing this as a way to improve on using the method/solution as described here (http://stackoverflow.com/questions/1443140/smoother-uiview). This solution wa...

Android OpenGL ES missing some components?

I'm trying to run the "HelloTriangle" example, from The OpenGL ES 2.0 Programming Guide, in the Android emulator. I import egl.EGLConfig and opengles.GL10 from javax.microedition.khronos, but the ESContext type and definitions such as GL_COMPILE_STATUS and GL_FRAGMENT_SHADER can't be resolved. I reworked the triangle example somewhat...

Applying brightness and contrast with OpenGL ES

I want to change the brightness and contrast of a texture on the iPhone. I've been looking at the sample provided by apple (GLImageProcessing) but it only is able to do one at a time (calling both methods in the sample overwrites the previous result). Brightness works great: glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE); i...

How does one interact with OBJ-based 3D models on iPhone?

I have a few different OBJ files that I am able to parse and display. This code is based on Jeff LaMarche's The Start of a WaveFront OBJ File Loader Class. However, I need some means of detecting what coordinates I have selected within a displayed model. Usually there is one model displayed at a time but sometimes there will be two or mo...

Zoom in and out in OpenGl ES

To zoom in and out is it best practice to use glOrtho or glScale? ...

glMultiTexCoord in OpenGl ES

Can anyone explain how to use glMultiTexCoord() in comparison with glTexCoordPointer()? ...

How can I fix 'sticky' touchesMoved in my openGLES app?

I have my openGL scene rendering using the detach thread method //This is at the end of my init method SEL selector = @selector(preMainLoop); NSThread *thread = [[NSThread alloc] initWithTarget:self selector:selector object:nil]; [thread start]; [thread release]; } -(void) preMainLoop { while (isRunning) { NSAutoreleasePool *lo...

How can I test if my framebuffer object is rendering properly?

I'm using a framebuffer object with a color buffer attachment to do some per-pixel hit testing. I'd like to render it to the screen for debugging and testing but right now all I'm getting is a big white nothingness. I assume I have to send some render command similar to glSwapBuffers(), but as I'm only using one buffer I don't know wha...

Scrolling in Open GL ES

Hi, I would like to scroll an object in my iPhone Screen. I am using OpenGL ES. It is not like a background scrolling that occurs in a game. It is just like, when the user touches it and scrolls when he/she wants to. Can someone please tell me how to do it? Thanks :) ...

Porting Wii and/or PSOne Games to OpenGL ES

I have been asked to investigate porting Wii games and some (Sony) PSOne games to OpenGL ES (can you guess what platform?). I have never undertaken a game port like this before (and will be hiring someone to do it) but I'd like to understand the process. Does the Wii use OpenGL? If not what does it use and how easy is it to port to Op...

OpenGL ES - Change hue of colors in texture

Hi everyone, I'm developing a simple 2D-game in OpenGL ES for the iPhone. My problem is that I want to render a texture using different hues. Basically I want to change the hue of the colors in the texture that i render. Simply changing the glColor will not do since it also affects the parts of the image without color. Any ideas? ...

How to Draw pixel data taken from the backbuffer back to itself ?

I'm working on a mobile application for Symbian 5th edition using OpenGLES. This application is a pretty standard 2D app, and I make no use of the DepthBuffer. I need to grab a snapshot of the display and then draw the very same snapshot back to the backbuffer. I'm using glReadPixels((GLint)0, (GLint)0, (GLint)nWidth-1, (GLint)nH...