Re: Initializing NSOpenGLViews
Re: Initializing NSOpenGLViews
- Subject: Re: Initializing NSOpenGLViews
- From: Jake Repp <email@hidden>
- Date: Tue, 10 Dec 2002 17:13:12 -0800
Download this tutorial and check out the subclass of NSOpenGLView
(Lesson02View)
http://withay.com/macosx/opengl/Lesson02_OSXCocoa.zip
If you want to embed your NSOpenGLView in a custom view from interface
builder you will want to override initWithFrame:
- (void) initWithFrame: (NSRect) frame
{
return [self initWithFrame:frame colorBits:16 depthBits:16
fullscreen:FALSE];
}
See the tutorial for the extended initWithFrame code.
-jake
On Tuesday, December 10, 2002, at 04:50 PM, Dean Tresner wrote:
>
Hussein,
>
>
You should override the -reshape method and put your perspective and
>
viewing related transformations in there. reshape is called after the
>
init and again each time your window gets re-sized, so it's
>
appropriate for things like gluLookAt and particularly gluPerspective
>
which needs to know the current aspect ratio.
>
>
Dean
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.