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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to