• 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: Clunky API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Simple Array
  • Next by Date: Re: How to hide a window?
  • Previous by thread: Re: Clunky API
  • Next by thread: How to using a library ?
  • Index(es):
    • Date
    • Thread