ooops yes.
wes
On Thu, May 8, 2008 at 11:43 AM, Jocelyn Houle <email@hidden> wrote:
>
>
> On 2008-05-08, at 14:35 , Wesley Smith wrote:
>
>
> >
> > >
> > > Apple defines a point like this.
> > >
> > > typedef struct _NSPoint {
> > > float x;
> > > float y;
> > > } NSPoint;
> > >
> > > Apple also repeats this pattern in some of their sample code like this.
> > >
> > > typedef struct {
> > > GLdouble x,y,z;
> > > } recVec;
> > >
> > >
> >
> > You can always do:
> >
> > NSPoint p;
> > glVertex2fv((float *)&p);
> >
> > revVec v;
> > glVertex3fv((float *)&v);
> >
>
> Just to be pedantic...
>
> Better call:
> glVertex3dv((double*)&v)
> on that second example, or you will get garbage...
>
>
> You can also use the following forms:
> glVertex2fv( &p.x );
> glVertex3dv( &v.x );
> which might be more compact.
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden