opengl-es

In opengl es 2, is there a way to prevent interpolation of varyings

In other words, emulating the old opengl flat shading model, so you could for example have a line strip where each segment is a distinct color rather than an interpolation of color across the segment? ...

Mixing OpenGL and UIKit

Hi! My current iPhone app uses UIKit. Now I want some small effects in the app, for example a text looking like it's blowing up. My idea is to use OpenGL for these effects. Is it a good idea to mix UIKit and OpenGL like this or should I avoid it? I have read some posts saying it's not a good idea and other saying it works just fine. Wha...

Check if object is visible

How would I check if an object drawn in openGL-ES is visible? ...

Creating on-the-fly extruded characters with OpenGL ES?

I'm trying to find a way to take a given outline font character and extrude it into a 3D object using OpenGL ES. From http://jlongster.com/blog/2010/02/08/fonts-ugh/ it sounds like as of Feb 2010 there wasn't an easy way to do this, but I thought I would tap into the collective wisdom of SO and see if there had been any new developments ...

Right tool for the job: CoreAnimation, Cocoa Animation, or OpenGL ES?

I am relatively new to doing graphics work on the iPhone and was hoping to get some guidance on which technology I should employ. The issue I am facing is that I need to create an iPhone app that will have a spinning wheel in it, think the Price Is Right wheel. I am not looking for anyone to provide a detailed solution, that would spoi...

OpenGL lighting working on iPhone 4/iPad, not on iPhone 3G

Hello everyone. I am having trouble with OpenGL 1.1 lighting. My code works on the iPhone 4 but not the iPhone 3G. Everything appears unlit (flat colours). I don't have a 3GS so I can't find out if it works on that one or not. Here is my lighting setup: - (void)setupLighting { const GLfloat lightAmbient[] = {0.2, 0.2, ...

Rubik's Cube iphone Application

Hello Everyone, I am working on Rubik's Cube iphone application. But i am stuck in the middle of the development. I am using SIO2 Gaming Engine for the development. Can anyone please provide some sample source code for Rubik's Cube iphone application. Thanks & Regards Tariq ...

android opengl view (with camera preview) is not visible after activity resumed

i overlapped opengl view and camera preview, and it shows everything at fresh start. but after backed from child activity (after onResume()) opengl objects not appeared anymore. i found some discussion about this weird problem, but i can't use following solution, because i should call child - map activity. http://groups.google.com/gro...

in GLSL under OpenGL ES 2, how can I write a shader that operates on the previous output

I need a shader that starts with a given texture, then each frame of animation operates on the previous output of the shader plus other input. How do I organize the framebuffers so that each frame has access to the output of the previous frame without having to move the buffer back and forth from the CPU? ...

Texturing a square in OpenGL ES on Android

Alright, so I've got this OpenGL tutorial I'm basing from, my current code is equivalent to Part II of it, which is here: http://blog.jayway.com/2009/12/04/opengl-es-tutorial-for-android-%E2%80%93-part-ii-building-a-polygon/ The code for that can be downloaded near the bottom of the page. It leaves you with a white square, and I want t...

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 is updated at a rate of 30 fps (via NSTimer). The smoothness of the drawing is ok... But not quite as smooth as a game like iFighter. Wha...

Problems using glDrawTexfOES to render background image with foreground objects

I have a simple iPhone OpenGL ES app, in which I render a full-screen background image using a texture, and then draw 3D polyhedra on top of it using lines. The texture is displayed using glDrawTexfOES. The problem is that I don't seem able to display the polyhedra on top of the background. In the glDrawTexfOES call, if I use a z value ...

Why does full-screen iPhone background texture need y-offset of 32 points?

I'm using a full-screen background texture. It's stored in a 512x512 PNG file. When rendering it to the screen using glDrawTexfOES, for some reason I need to add a 32 point y-offset in order to make it align with the screen. Why? glBindTexture(GL_TEXTURE_2D, backgroundTexture); int backgroundRectangle[] = { 0, 480, 320, -480 }; // Handl...

Switching OpenGL to perspective mode on top of a half rendered orthographic scene?

We have a mostly 2D game that runs in orthographic mode, but one part shows a 3d model that is rendered in between the other 2D objects. How can I switch to perspective mode, render that model, then switch back to render the other objects in orthographic mode? Kudos if you can show how it's done in OpenGL ES. ...

OpenGL ES tiled object (cube?), with clickable tiles

I'm starting study opengl, and im tring to make a 3d chess like, but i cant figureout, how i can know where i have clicked in the "table" to make the proper animations, any advice ? ...

How to get around the performance issues with Buffer.put() and Android OpenGL

It is a Java issue in general, though in this particular case I am using Vertex Arrays in Android for OpenGL. To use this basic GL system, you must use Java's Buffer system in native allocation mode. This is very slow on Java. And roughly 40-50% of my entire application's time is spent inside of buffer.put(). Is there any way to speed t...

Eraser in OpenGL ES iphone

i have two images which are overlapping on each other.(the way in which cards are placed on top of each other) now if i move my finger over the top most image that portion of the image should become transparent.(opacity of that part should become 0). i am new to OpenGL ES development. kindly help me out or give me any suggestion to co...

Playing video in background of openGl application on iPhone

I found some tutorials about playing a fullscreen video on the iPhone, but I wonder if it is possible to play an embedded movie in the background of a openGl animated app? The movie should just loop seamlessly and should not have any control buttons like play/pause/volume popping up while being played. If possible, then how about perfo...

OpenGL-ES 1.1 iPhone - Depth buffer causes magenta screen

I have an iPhone OpenGL-ES 1.1 project that renders simple 3D models. If I do not attach a depth buffer, everything renders correctly (except with no depth awareness of course). When I attach the depth buffer however, all that renders is a magenta screen. The clear color is not set to magenta. It is blue. Anyone know what is going on her...

OpenGL ES: Rotating 3d model around itself

Hi, I'm playing with OpenGL ES on iPhone and I'm trying to rotate a model by panning with the finger. I discovered the open source app Molecules that let's you do that and I'm looking at that code, but when it comes to rotate a model of mine I'm able to rotate it only around a point distant in the space (like it was in orbit as a satelli...