Re: iOS OpenGL ES woes

2013-07-03 Thread Vincent Habchi
David,

BTW, is it possible to add subviews to a CAEAGLLayer backed view? I have been 
fighting all day to show a progress indicator atop this backed view, in vain.

Thanks!
Vincent


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-03 Thread David Duncan
On Jul 3, 2013, at 10:08 AM, Vincent Habchi vi...@macports.org wrote:

 David,
 
 BTW, is it possible to add subviews to a CAEAGLLayer backed view? I have been 
 fighting all day to show a progress indicator atop this backed view, in vain.


Yes, as long as you wrap the CAEAGLLayer with a UIView (override +layerClass), 
then you can add subviews to that view to your hearts content.
--
David Duncan


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-03 Thread vincent habchi
David,
 Yes, […]

Thanks for your quick answer and your kindness, as usual! Then something is 
wrong with my setup, I’ll investigate further.

Have a great day!
Vincent


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

iOS OpenGL ES woes

2013-07-02 Thread Vincent Habchi
Hi folks,

I am trying to develop a demo application (DEM viewer) on iOS for educational 
purposes. I am fairly fluent with OpenGL but this my first try at an iOS app (I 
usually do OS X development). My problem is that albeit I seem to have abided 
by all terms of what’s described in the ‘Drawing with OpenGL ES’ document, 
nothing appears on screen.

I create a window/view controller/view with an opaque CAEAGLLayer. I alloc 
everything, EAGLContext, frame buffer, render buffer, call [_glContext 
renderBufferStorage:fromDrawable], etc. check if my frame buffer is complete 
(it is) and eventually I just try to clear the display to blue via a 
glClearColor (0, 0, 1, 1) in the -viewDidLoad: method  (calling glFlush () 
immediately after). Nothing happens (on the simulator): I get a white screen.

I have fiddled with some controls in IB, but to no avail.

Has anybody any hint?

Thanks!
Vincent


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-02 Thread vincent habchi
Uh, I just realized I had overlooked the call to EAGLContext 
presentRenderbuffer. It should work better when I add it.

Sorry for the noise, but this is a bit confusing at start!

Vincent


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-02 Thread Vincent Habchi
On 2 juil. 2013, at 17:54, Vincent Habchi vi...@macports.org wrote:

 Uh, I just realized I had overlooked the call to EAGLContext 
 presentRenderbuffer. It should work better when I add it.

It doesn’t work even with that call added. I don’t really grasp when the 
CAEAGLLayer gets somehow hooked to the render buffer. Maybe I should ask on the 
OpenGL list instead.

Vincent


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-02 Thread David Duncan
Honestly my first question would be why not use GLKit (which the Xcode OpenGL 
ES template should be using by default) instead? It pretty much sets up all the 
expected bits for you.

On Jul 2, 2013, at 12:46 PM, Vincent Habchi vi...@macports.org wrote:

 On 2 juil. 2013, at 17:54, Vincent Habchi vi...@macports.org wrote:
 
 Uh, I just realized I had overlooked the call to EAGLContext 
 presentRenderbuffer. It should work better when I add it.
 
 It doesn’t work even with that call added. I don’t really grasp when the 
 CAEAGLLayer gets somehow hooked to the render buffer. Maybe I should ask on 
 the OpenGL list instead.
 
 Vincent
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
 
 This email sent to david.dun...@apple.com

--
David Duncan


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-02 Thread Vincent Habchi
Hi David,

I made it work eventually. I just figured out both the frame buffer and the 
render buffer must be bound before drawing. Now I have a fine blue screen, so I 
guess I can go ahead after a good sleep. :)

 Honestly my first question would be why not use GLKit (which the Xcode OpenGL 
 ES template should be using by default) instead? It pretty much sets up all 
 the expected bits for you.

I use the GLKit for matrix operations. It is very handy. But I like being able 
to tinker with OpenGL the hard way: I begun as a assembly kernel programer, I 
still appreciate low level APIs over higher abstractions!

Just a further question: on a CAEAGLLayer backed view, [view setNeedDisplay] 
does nothing, doesn’t it?

Thanks for your answer!
Vincent


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-02 Thread David Rowland
I found it helpful to start with a working sample code app. GLSprite was my 
mentor.

David



On Jul 2, 2013, at 12:46 PM, Vincent Habchi vi...@macports.org wrote:

 On 2 juil. 2013, at 17:54, Vincent Habchi vi...@macports.org wrote:
 
 Uh, I just realized I had overlooked the call to EAGLContext 
 presentRenderbuffer. It should work better when I add it.
 
 It doesn’t work even with that call added. I don’t really grasp when the 
 CAEAGLLayer gets somehow hooked to the render buffer. Maybe I should ask on 
 the OpenGL list instead.
 
 Vincent
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/rowlandd%40sbcglobal.net
 
 This email sent to rowla...@sbcglobal.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS OpenGL ES woes

2013-07-02 Thread David Duncan

On Jul 2, 2013, at 1:15 PM, Vincent Habchi vi...@macports.org wrote:

 Just a further question: on a CAEAGLLayer backed view, [view setNeedDisplay] 
 does nothing, doesn’t it?


Correct. You'll get a log along the lines of -display does nothing in the 
console.
--
David Duncan


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com