Re: Coordinate system in CAOpenGLLayer

2011-08-08 Thread Graham Cox
; if (*ra4 != 0xffc78948) { return false; } > > On 8 Aug 2011, at 08:35, Graham Cox wrote: > >> I'm looking at using CAOpenGLLayer to boost drawing performance. I'm a total >> novice at OpenGL. ___ Cocoa-dev mailing list (Cocoa-dev

Re: Coordinate system in CAOpenGLLayer

2011-08-08 Thread Thomas Davie
when you come to it is trivially easy. Thanks Tom Davie if (*ra4 != 0xffc78948) { return false; } On 8 Aug 2011, at 08:35, Graham Cox wrote: > I'm looking at using CAOpenGLLayer to boost drawing performance. I'm a total > novice at OpenGL. > > Looking at the 'CALaye

Coordinate system in CAOpenGLLayer

2011-08-08 Thread Graham Cox
I'm looking at using CAOpenGLLayer to boost drawing performance. I'm a total novice at OpenGL. Looking at the 'CALayerEssentials' sample code as a starting point, it has the following code: -(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelF

Re: CAOpenGLLayer content size

2011-07-13 Thread David Duncan
On Jul 13, 2011, at 4:06 PM, Takashi Mochizuki wrote: > I have noticed -setNeedsDisplay seems to breaks contentsGravity like > kCAGravityResizeAspect. > BackBuffer rect seems to control contentsGravity behavior. > > - How can I make "kCAGravity compatible" CAOpenGL

Re: CAOpenGLLayer content size

2011-07-13 Thread Takashi Mochizuki
I have noticed -setNeedsDisplay seems to breaks contentsGravity like kCAGravityResizeAspect. BackBuffer rect seems to control contentsGravity behavior. - How can I make "kCAGravity compatible" CAOpenGLLayer? To make contentsGravity property work property , I think CAOpenGLLayer sh

Re: CAOpenGLLayer content size

2011-07-12 Thread David Duncan
On Jul 8, 2011, at 11:33 PM, Takashi Mochizuki wrote: > Default CAOpenGLLayer keeps initial buffer size when addSubLayer: is called. > And it does not update back buffer size even when layer is resized like: > > 1. addSubLayer to 200x200 > 2. resize layer to 400x400 > 3

CAOpenGLLayer content size

2011-07-11 Thread Takashi Mochizuki
How can I set static content size to CAOpenGLLayer? // Default CAOpenGLLayer keeps initial buffer size when addSubLayer: is called. And it does not update back buffer size even when layer is resized like: 1. addSubLayer to 200x200 2. resize layer to 400x400 3. layer only shows 200x200 area

Re: Best way to draw text in CAOpenGLLayer

2009-05-24 Thread Anshul jain
suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using Is this the right approach to do it. In Core Animation if you want to scroll something, then you move its layer. There is no need to

Re: Best way to draw text in CAOpenGLLayer

2009-05-22 Thread David Duncan
On May 21, 2009, at 11:25 PM, Anshul jain wrote: Hi thanks for suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using Is this the right approach to do it. In Core Animation if you want to

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Anshul jain
HI thanks for suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using - (void)drawInCGLContext:(CGLContextObj)glContext pixelFormat: (CGLPixelFormatObj)pixelFormat forLayerTime: (CFTimeInterval

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Anshul jain
HI thanks for suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using - (void)drawInCGLContext:(CGLContextObj)glContext pixelFormat: (CGLPixelFormatObj)pixelFormat forLayerTime: (CFTimeInterval

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread David Duncan
On May 21, 2009, at 10:12 AM, David Duncan wrote: Don't. Use a CATextLayer (which can render text for you) or a CALayer (to display image content) instead. Unless you want to get outlines of your text, the CAOpenGLLayer is really not a good way to do this. Clarifying a bit - unles

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread David Duncan
On May 21, 2009, at 3:23 AM, Anshul jain wrote: I am trying to scroll text in CAOpenGLLayer Don't. Use a CATextLayer (which can render text for you) or a CALayer (to display image content) instead. Unless you want to get outlines of your text, the CAOpenGLLayer is really not a goo

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Corbin Dunn
But the scrolling is not smooth and the CPU usage was 60 % - 80%. I think application is taking time to convert NSString into a CGImage. Do you know that is the case? If you have any performance issue, you should use sample and Shark. Then you can try to figure out what is wrong. -corb

Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Anshul jain
HI All, I am trying to scroll text in CAOpenGLLayer. Every thing is working fine. But the scrolling is not smooth and the CPU usage was 60 % - 80%. I think application is taking time to convert NSString into a CGImage. Is there a better way of displaying text in CAOpenGLLayer. This is

Re: Can we render QCRenderer in CAOpenGLLayer..?

2009-02-01 Thread Anshul jain
bug in QCCompositionLayer with garbage collection that prevents the composition from playing. QCCompositionLayer is a subclass of CAOpenGLLayer. Maybe you hit the same bug? On 1/31/09 10:09 AM, "cocoa-dev-requ...@lists.apple.com" wrote: I am trying to play QCComposition in CAO

Re: Can we render QCRenderer in CAOpenGLLayer..?

2009-01-31 Thread Gordon Apple
Just curious - are you using garbage collection? We recently determined there is a bug in QCCompositionLayer with garbage collection that prevents the composition from playing. QCCompositionLayer is a subclass of CAOpenGLLayer. Maybe you hit the same bug? On 1/31/09 10:09 AM, "coco

Can we render QCRenderer in CAOpenGLLayer..?

2009-01-31 Thread Anshul jain
I am trying to play QCComposition in CAOpenGLLayer According to the documentation of QCRenderer this should work fine. but at final output nothing is displayed. Can anyone tell me where i am going wrong...? but at final output nothing is displayed. Can anyone tell me where i am going wrong

Re: QCComposition in CAOpenGLLayer

2009-01-30 Thread David Duncan
On Jan 30, 2009, at 1:03 AM, Anshul jain wrote: i am trying to play QCComposition in CAOpenGLLayer Why not use the QCCompositionLayer? -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

RE: QCComposition in CAOpenGLLayer

2009-01-30 Thread Anshul jain
i am trying to play QCComposition in CAOpenGLLayer Sorry for the earlier post here is the snippet of the code According to the documentation of QCrenderer this should work fine. but at final output nothing is displayed. Can anyone tell me where i am going wrong. - (id) init

CComposition in CAOpenGLLayer

2009-01-30 Thread Anshul jain
i am trying to play QCComposition in CAOpenGLLayer here is the snippet of the code Thanks Anshul jain ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: CAOpenGLLayer no Antialiasing?

2008-11-08 Thread David Duncan
On Nov 7, 2008, at 6:13 PM, Nik Youdale wrote: I am having trouble enabling antialiasing in a CAOpenGLLayer subclass. Specifically I am trying to use Multisampling. I have set up the pixel format with multisampling enabled, etc. The same rendering code works in an NSOpenGLView with

CAOpenGLLayer no Antialiasing?

2008-11-08 Thread Nik Youdale
Hi, I am having trouble enabling antialiasing in a CAOpenGLLayer subclass. Specifically I am trying to use Multisampling. I have set up the pixel format with multisampling enabled, etc. The same rendering code works in an NSOpenGLView with multisampling setup in the pixel format. (It

Re: CAOpenGLLayer

2008-04-02 Thread Stefan Hafeneger
Okay thank you. With best wishes, Stefan Am 02.04.2008 um 22:19 schrieb John Harper: Hi, yes, that seems like a good solution, John On Apr 2, 2008, at 12:23 PM, Stefan Hafeneger wrote: Hi John, I now setup the environment in copyCGLContextForPixelFormat. The folling code seemd

Re: CAOpenGLLayer

2008-04-02 Thread John Harper
Hi, yes, that seems like a good solution, John On Apr 2, 2008, at 12:23 PM, Stefan Hafeneger wrote: Hi John, I now setup the environment in copyCGLContextForPixelFormat. The folling code seemd to work fine. Do you see anything that would create a crash or is this okay? The code s

Re: CAOpenGLLayer

2008-04-02 Thread Stefan Hafeneger
Hi John, I now setup the environment in copyCGLContextForPixelFormat. The folling code seemd to work fine. Do you see anything that would create a crash or is this okay? The code should work if the view moves from one screen to another, shouldn't it? [CODE] - (CGLPixelFormatObj)copyCGLPix

Re: CAOpenGLLayer

2008-03-30 Thread John Harper
Hi, On Mar 29, 2008, at 9:01 AM, Stefan Hafeneger wrote: I would like to use CAOpenGLLayer instead of NSOpenGLView. I didn't find any example source code but got it working. I implemented … The API documentation says that the viewport is already set to bounds size before drawInCGLCo

CAOpenGLLayer

2008-03-29 Thread Stefan Hafeneger
Hi, I would like to use CAOpenGLLayer instead of NSOpenGLView. I didn't find any example source code but got it working. I implemented - (BOOL)canDrawInCGLContext:(CGLContextObj)glContext pixelFormat: (CGLPixelFormatObj)pixelFormat - (void)drawInCGLContext:(CGLContextObj)glCo