• 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: C to Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C to Objective-C


  • Subject: Re: C to Objective-C
  • From: "Clark S. Cox III" <email@hidden>
  • Date: Fri, 4 Oct 2002 12:37:22 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Friday, Oct 4, 2002, at 12:18 US/Eastern, Ondra Cada wrote:


On Friday, October 4, 2002, at 05:17 , Clark S. Cox III wrote:

void vertices(float xVert[], float yVert[], int TOTAL)
{
int i;
for(i=0; i < TOTAL; i++) {
glTranslatef(xVert[i], yVert[i], 0.0);
...
Or, even better:

- - (void)verticesX:(const float*)xVert Y:(const float*)yVert T:(size_t)TOTAL;

You sure? I don't know what and how glTranslate does, but it looks very like it wants to *change* them.

Yep, notice that the arrays are dereferenced (by the array subscript) before passing to glTranslate, that means that a plain ol' float is getting passed. Plus glTranslatef is a standard OpenGL function declared as (or close to):

void glTranslatef(float, float, float);

- -- http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iEYEARECAAYFAj2dw8gACgkQd6STocYT1xUwdwCfdHhBAnETbmFDCSmY4M2ScXj+
4ncAniGz7Nh6bJmEmk2zj8qUCUlz5b1a
=L+Rn
-----END PGP SIGNATURE-----
_______________________________________________
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.

  • Follow-Ups:
    • Re: C to Objective-C
      • From: Brent Gulanowski <email@hidden>
References: 
 >Re: C to Objective-C (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: C to Objective-C
  • Next by Date: Re: notification on windowing being frontmost.
  • Previous by thread: Re: C to Objective-C
  • Next by thread: Re: C to Objective-C
  • Index(es):
    • Date
    • Thread