eaglview

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... ...

Capturing EAGLview content WITH alpha channel on iPhone

Hello, have been struggling with this issue for quite some time now and couldn't find an answer so far. Basically, what I want to do, is capturing the content of my EAGLview and then use it to merge it with other images. Anyway, the mainproblem is, that everything transparent in my EAGLview renders opaque when saving it to the photoalbu...

How to Display ngmoco's Fireworks App Over a UIImageView?

Tim Omernick from ngmoco recently gave a talk at Stanford and demonstrated an interesting fireworks app for the iPhone that he posted up the code for here: gamemakers.ngmoco.com/post/111712416/stanford-university-and-apple-were-kind-enough-to I can get the app to run when I specify the EAGLView's parent class as a UIView in its header ...

Screen-to-World coordinate conversion in OpenGLES an easy task?

The Screen-to-world problem on the iPhone I have a 3D model (CUBE) rendered in an EAGLView and I want to be able to detect when I am touching the center of a given face (From any orientation angle) of the cube. Sounds pretty easy but it is not... The problem: How do I accurately relate screen-coordinates (touch point) to world-coo...

Can I get the color of the pixel at a Touch Point on an EAGLView

I want to get the color of the Pixel at a specific Touch Point on an EAGLView. Is this possible, and if so, how? ...

Tracking 3D cube position OpenGL?

SHORT INTRO: I'm having trouble with a 3D cube on a plane. The plane is a grid of squares. The ID number of the square that the cube currently occupies on is stored in a storage-variable. This is so that I can tell whether or not adjacent squares are free for the cube to move onto. When I move the cube, the storage-variable is updated to...

Can I use an EAGLView in my UIViewController?

I have a UIViewController that instantiates several UIImageViews on the screen. Is it possible to instantiate an EAGLView (like the one in the OpenGL ES template in the iPhone SDK) in a similar manner in my View Controller, and possibly have the UIImageViews as well as an EAGLView all running simultaneously on the same screen? ...

How to get UIImage from texture of an EAGLView?

I am trying to get a UIImage from a texture I loaded into EAGLView using the following way: //Try to get UIImage from EAGLView and assign to imageDataPhoto1 UIGraphicsBeginImageContext(myEAGLView.bounds.size); [myEAGLView.layer renderInContext:UIGraphicsGetCurrentContext()]; imageDataPhoto1 = UIGraphicsGetImageFromCurrentImageContext()...

How to get UIImage from EAGLView?

I am trying to get a UIImage from what is displayed in my EAGLView. Any suggestions on how to do this? ...

How can I blend between my UIView and my EAGLView?

I have an opengl scene rendering on an EAGLView layer and some other elements (circles and such) rendering on a UIView (which is a sibling of the EAGLView, positioned above it). Is it possible to blend colors between the two layers? I'd like to do some difference blending to get an inversion effect on the colors from EAGLView. I've ...

Framebuffer Object Problem

Hello I'm programming in OpenGLES for the iPhone but I'm currently stuck with a strange framebuffer object error. At first I was following a few tutorials from Simon Maurice: http://web.me.com/smaurice/AppleCoder/Welcome.html But then I moved on to do a few experiments of my own before continuing with other tutorials, however my experi...

How can I display my UIImage on an EAGLView (iPhone)?

I have a UIImage. I have an EAGLView in my app, which is a derivative of the GLPaint ("Shake Me!") sample program. The UIImage is full-screen (320x480.) Actually, it's a screen-capture of the EAGLView's image from earlier in the program (like in this question.) I'd like to set the layer-contents of the EAGLView to the image, and then...

iPhone, rotated + EAGLView, rotated =

...frustration. I want my game to be run only in landscape mode. I have added the appropriate key/value to the Info.plist file that forces the device orientation to be correct at launch. I'm now trying to rotate the OpenGL coordinate space to match that of the device. I'm trying to use the code I found here, but it's not working. My...

Can I have multiple full-screen OpenGL views (EAGLView) displayed at the same time on iPhone?

Can I have 2 full-screen EAGLView-s (the OpenGL layer implementation from Apple's sample code), stack them on top of each other, draw on them independently and then see both images? (I suppose the top one will need a glClearColor(0, 0, 0, 0) to be transparent -- does that even work?!) In my initial experiments, the 2nd EAGLView complai...

Looking for Tim Omernick's Fireworks iPhone app

Does anyone have the Fireworks app that Tim Omernick (of ngmoco) posted here: gamemakers.ngmoco.com/post/111712416/stanford-university-and-apple-were-kind-enough-to He originally provided a download link to the source code, but the download link is down and just says "Account Suspended". I am currently working on my own OpenGL ES game ...

Textures not drawing if multiple EAGLViews are used.

Hi, I'm having a bit of a problem with Apples EAGLView and Texture2D. If I create an instance of EAGLView and draw some textures, it works great. However, whenever I create a second instance of EAGLView, the textures in the new view(s) aren't drawn. Being new to OpenGL, I've got absolutely now clue as to what is causing this behavior. I...

iPhone: How much OpenGL cleanup do I need to do when a context goes away?

I several views in an iPhone app which happen to use independent openGL contexts. They are not necessarily long-lived so they go away before the process does. And they have a couple textures in each. Does -releaseing the EAGLContext cause all that GL state to get cleaned up for me? Or am I leaking textures etc by not finding a place to...

Pause animation in EAGLView which is in a UITableViewCell

I have an animation in a EAGLView which is itself in a UITableViewCell. How can I pause the animation in the EAGLView when the view is not visible? Normally, I would simply use the responsible UIViewController and listen to viewDidDisappear. But how do I do that if the EAGLView is in a table? ...

Problem trying to draw a plane in OpenGL-ES iPhone

Hello everyone. I would like to say that my OpenGL-ES experience is very limited and that I've been searching for an answer without success. I'm trying to draw a textured plane with the following code const GLfloat spriteVertices[] = { -1.0f, -1.5f, 1.0f, -1.5f, -1.0f, 1.5f, 1.0f, 1.5f, }; glVe...

glDrawArrays crash with EXC_BAD_ACCESS

Hello! I'm writing an iPhone application which uses UIView with a CAEAGLayer as its layer. Everything is fine and working apart from 1 small problem: sometimes it crashes with EXC_BAD_ACCESS and the following stack trace: [EAGLView draw] glDrawArrays_Exec PrepareToDraw DrawFramebufferMakeResident AttachmentMakeResid...