• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: QCView openGLContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QCView openGLContext


  • Subject: Re: QCView openGLContext
  • From: Sam McDonald <email@hidden>
  • Date: Thu, 13 Mar 2008 19:23:35 -0500

I have programmed cocoa for less than a year, so if I say something stupid please bare with me. Of the programming I have done most of it has been with QC apps. From what I remember the openGLContext was added in 10.5 (and made me very excited).

In my 10.4 application I created a glcontext, set its view, and rendered to it using a QCRenderer. Here is what that looked like, please don't laugh at my ugly code, this is some of the first objective-c I wrote:

//Create OpenGL context used to render the QCRenderers and attach it to the rendering view
NSOpenGLPixelFormatAttribute attributes[] = {NSOpenGLPFAAccelerated, NSOpenGLPFANoRecovery, NSOpenGLPFADoubleBuffer, NSOpenGLPFADepthSize, 24, 0};


glPixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
_glContext = [[NSOpenGLContext alloc] initWithFormat:glPixelFormat shareContext:nil];
[_glContext setView:_renderView];

// Create QCRenderers from composition file
compositionPath = [bundle pathForResource:_compositionName ofType:@"qtz"];
renderer = [[QCRenderer alloc] initWithOpenGLContext:_glContext pixelFormat:glPixelFormat file:compositionPath];



This will allows you to flush your buffer, but doesn't produce nearly as nice code as what the 10.5 stuff allows you to do.


Sam McDonald
Trimonix


On Mar 13, 2008, at 6:53 PM, Lorenzo wrote:

Hi,
I build my app against 10.4 SDK. The compiler says that there are no errors.
My app runs on Leopard very well. But on Tiger I get this error all the time
and my app won't launch.
--
[MYQCView openGLContext] : selector not recognized [self = 0x1492fee0]
--


If I comment this line below
[[qcView openGLContext] flushBuffer];
my app launches and runs well, but of course I can't see the QCView contents
properly. I have seen that this API is available in 10.5 and later. Anyway
my compiler doesn't protest when I build my app against 10.4 SDK. This a
part, how can I make this work on Tiger too? Any workaround?



Best Regards -- Lorenzo email: email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: QCView openGLContext
      • From: Lorenzo <email@hidden>
References: 
 >QCView openGLContext (From: Lorenzo <email@hidden>)

  • Prev by Date: QCView openGLContext
  • Next by Date: Re: BitMap data format and autorelease
  • Previous by thread: QCView openGLContext
  • Next by thread: Re: QCView openGLContext
  • Index(es):
    • Date
    • Thread