• 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: Coordinate system in CAOpenGLLayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coordinate system in CAOpenGLLayer


  • Subject: Re: Coordinate system in CAOpenGLLayer
  • From: Graham Cox <email@hidden>
  • Date: Mon, 08 Aug 2011 20:14:23 +1000

Thanks Thomas, I'll check it out.

--Graham


On 08/08/2011, at 6:24 PM, Thomas Davie wrote:

> You're right – the vertices are here specified in OpenGL "clip space" – a coordinate system stretching from -1 to 1 on all 3 axes.  If you want to specify points in a different coordinate space, it's your responsibility to make sure that they end up in clip space, by transforming them appropriately.  In old world GL (as you have there) this is done through the fixed function transform:
>
> vertex in model space -- * modelview matrix -> vertex in world space -- * projection matrix -> vertex in clip space -- divide x,y,z by w -> vertex in normalised device space -- viewport transform -> vertex in pixel space
>
> I would however *highly* recommend not using old world GL.  It will make your later transition to OpenGL 3.2 core much much harder, as most of the functions here (glMatrixMode, glPushMatrix, glRotate, glBegin, glColor, glVertex, glEnd, glPopMatrix, and many others) are no longer present.
>
> To get an idea of how to get started with modern OpenGL, take a look at https://github.com/beelsebob/Cocoa-GL-Tutorial and https://github.com/beelsebob/Cocoa-GL-Tutorial-2.  These are still written in OpenGL 2.1, but in a way that the port to 3.2 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.

_______________________________________________

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

References: 
 >Coordinate system in CAOpenGLLayer (From: Graham Cox <email@hidden>)
 >Re: Coordinate system in CAOpenGLLayer (From: Thomas Davie <email@hidden>)

  • Prev by Date: Re: resizing window containing NSView with CALayer
  • Next by Date: Re: resizing window containing NSView with CALayer
  • Previous by thread: Re: Coordinate system in CAOpenGLLayer
  • Next by thread: Core Data : User missing inverse relationship despite model settings
  • Index(es):
    • Date
    • Thread