Re: Clunky API
Re: Clunky API
- Subject: Re: Clunky API
- From: Brian Webster <email@hidden>
- Date: Thu, 20 Sep 2001 11:35:03 -0500
On Thursday, September 20, 2001, at 08:12 AM, cocoa-dev-
email@hidden wrote:
1) when using OpenGL's glVertex3d (I may change to floats, it
depends on
my final requirements), I have to use [vector x], [vector y],
[vector z].
Typing that out is a bit of a pain. To rectify this, I've been
considering
writing a wrapper function which takes a vector and just calling it
instead.
Why not just make a method in your vector class that draws
itself as a gl vertex?
@implementation Vector
-(void)glVertex
{
glVertex3d(x, y, z);
}
@end
//drawing code
[vector glVertex];
--
Brian Webster
email@hidden
http://homepage.mac.com/~bwebster