Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-23-2011, 02:50 PM   #1 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default [openGL] setDrawabaleProperties issue inside UIViewController

Hello,

I wanted to put my EAGL layer context inside a UIViewController (instead of a regular UIView as per the sample apps) as follows:

Code:
- (id)init {

     if (self      = [super init]) {

          

// Get the layer

          CAEAGLLayer *eaglLayer = (CAEAGLLayer*) self.view.layer;

          

          eaglLayer.opaque = YES;

          eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:

                                                  [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];

          

context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];

          

          if(!context || ![EAGLContext setCurrentContext:context] || ![self createFramebuffer]) {

               [self release];

 returnnil;

          }

          

          [self setupView];

          [self drawView];
          

     }

     

 returnself;

}
All i did was change some self.layer to self.view.layer

It built with no errors but then I get a crash with the following message:


2011-01-23 14:43:24.791 MyApp[36059:207] -[CALayer setDrawableProperties:]: unrecognized selector sent to instance 0x4b37cd0
2011-01-23 14:43:24.793 MyApp[36059:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer setDrawableProperties:]: unrecognized selector sent to instance 0x4b37cd0'


I've been searching around but haven't been able to resolve this; can anyone help out? Thanks.
Whitehk is offline   Reply With Quote
Old 01-23-2011, 02:54 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

?!? Why are you reposting another persons post? http://www.iphonedevsdk.com/forum/ip...ontroller.html
baja_yu is offline   Reply With Quote
Old 01-23-2011, 02:59 PM   #3 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
?!? Why are you reposting another persons post? http://www.iphonedevsdk.com/forum/ip...ontroller.html
That link takes me right back to this page. However, I reposted it because it was a dead thread and I would like to know the answer as well.
Whitehk is offline   Reply With Quote
Reply

Bookmarks

Tags
eaglview, layer, opengl es, opengl es eaglview, uiviewcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 364
11 members and 353 guests
7twenty7, Clouds, dre, iAppDeveloper, jeroenkeij, Mah6447, Morrisone, sacha1996, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,899
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0