Questions tagged [eaglview]

OpenGL view for iOS application.

EAGLView class provides OpenGL ES API. t includes usages of Vertex Buffer Objects (VBOs), Vertex Array Objects (VAOs), Framebuffer Objects (FBO), and GLSL Program Objects. It creates a VAO and VBOs from model data loaded in. It then creates a texture for the model from image data and GLSL shaders from source also loaded in. Finally, it creates an FBO and texture to render a reflection of the model. It uses an environment mapping GLSL program to apply the reflection texture to a plane.

Complete Class

83 questions
14
votes
6 answers

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?
RexOnRoids
  • 14,002
  • 33
  • 96
  • 136
12
votes
1 answer

EAGLView to UIImage color conversion issue

I have an EAGLView (taken from Apple's examples) which I can successfully convert to a UIImage using this code: - (UIImage *)glToUIImage:(CGSize)size { NSInteger backingWidth = size.width; NSInteger backingHeight = size.height; NSInteger…
spybart
  • 2,583
  • 3
  • 22
  • 33
5
votes
1 answer

OpenGL 500 error in cocos2D-iphone on CCRenderTexture end

Working on a drawing app for ipad and using the CCRenderTexture as a canvas upon which sprites are painted. The draw loop I use is based on the one in the cocos example for the render texture class. [target begin]; float distance =…
Affian
  • 3,380
  • 5
  • 22
  • 26
5
votes
3 answers

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…
Wesux
  • 69
  • 1
  • 4
5
votes
5 answers

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... …
RexOnRoids
  • 14,002
  • 33
  • 96
  • 136
4
votes
1 answer

Synchronizing EAGLView presentation with frame resize on iPhone

I have an EAGLView which I am resizing in an animation, with the animation driven by an NSTimer that calls a draw function. As I resize the EAGLView, I need to adjust the projection for the view to maintain the aspect ratio of the contents. The…
Jason Cooper
  • 404
  • 3
  • 11
4
votes
1 answer

How to use gesture recognizer in an OpenGLES application of iPhone?

While I know how to use gesture recognizer in a view-based application,but when I apply the same ideas in a OpenGLSE-based application: for example, I add a TapGestureRecognizer,and when I tap on the EAGLView,it crashes. So can anyone show me a…
CarmeloS
  • 7,868
  • 8
  • 56
  • 103
4
votes
1 answer

Textures not drawing if multiple EAGLViews are used

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…
3
votes
1 answer

Capturing EAGLview content WITH alpha channel on iPhone

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…
friendlydeveloper
3
votes
2 answers

Multiple EAGLViews but only one copy of each texture - how?

I have an app running on iPad which is using lots of textures, rendering into one EAGLView. Now I need a second EAGLView, sharing textures with the first. I can get both views rendering fine, in parallel, on screen, by fixing some design mistakes in…
Adam
  • 32,900
  • 16
  • 126
  • 153
3
votes
3 answers

Why is my EAGLVIew not rendering anymore in iOS 4.2?

Upgrading to the iOS SDK 4.2 I'm experiencing several misbehaviors in my application (another one is asked here). The one I'm gonna ask your help for concerns an OpenGL view (an EAGLView subclass) that renders no more the 3d model I'm putting…
rano
  • 5,616
  • 4
  • 40
  • 66
3
votes
1 answer

glDrawArrays crash with EXC_BAD_ACCESS

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] …
Alexey
  • 7,262
  • 4
  • 48
  • 68
3
votes
3 answers

How do I grab an image from 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 not sure I'm doing the right thing as of what kind of malloc I should be doing. I gather that on OSX it's…
uimui
3
votes
2 answers

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…
spencewah
  • 2,196
  • 4
  • 20
  • 31
3
votes
1 answer

Draw UIImage (or JPEG) onto EAGLView

I am making a PDF annotator and when you switch pages it has to redraw all of the previously drawn OpenGL content (which was saved to file in JSON format). The problem is that it takes longer the more content there is to draw. I have a UIImage…
Nate_Hirsch
  • 671
  • 1
  • 6
  • 12
1
2 3 4 5 6