home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / programm / 7726 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.9 KB  |  75 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!chx400!josef!news
  3. From: roettig@ifi.unizh.ch (Thomas Roettig)
  4. Subject: Re: _very_ basic RenderMan question
  5. Message-ID: <1992Dec14.134841.557@ifi.unizh.ch>
  6. Sender: news@ifi.unizh.ch (USENET News Admin)
  7. Nntp-Posting-Host: atan
  8. Organization: University of Zurich, Department of Computer Science
  9. References: <92346.164214U54876@uicvm.uic.edu>
  10. Date: Mon, 14 Dec 1992 13:48:41 GMT
  11. Lines: 62
  12.  
  13. In article <92346.164214U54876@uicvm.uic.edu> <U54876@uicvm.uic.edu> writes:
  14. > Hello -
  15. >   To all you experienced NeXT programmers out there, a very basic question  
  16. abou
  17. > t RenderMan from someone who has just started programming.
  18. >   I have copied, verbatim, the "minimal program using RenderMan" from page 18
  19. > of The RenderMan Companion, saved it as test.c, and tried to compile it using:
  20. > cc -lMedia_s test.c -o test
  21. > I get:
  22. > /bin/ld: Undefined symbols:
  23. > _RiBegin
  24. > _RiWorldBegin
  25. > _RiSurface
  26. > _RI_P
  27. > _RiPolygon
  28. > _RiWorldEnd
  29. > _RiEnd
  30. > Can anyone take a little time to e-mail some help to me?  It would be greatly
  31. > appreciated.
  32. > -Tom
  33. Try it that way:
  34. -------------------------
  35. #import <ri/ri.h>
  36.  
  37. RtPoint Square[4]={{.5,.5,.5}, {0.5,-.5,.5}, {-.5,-.5,.5}, {-.5,.5,.5}};
  38.  
  39. int main(void)
  40. {
  41.     char *archive = "archive";
  42.     
  43.     RiBegin(RI_NULL, "renderer", &archive, RI_NULL);    /*Start the renderer */
  44.         RiWorldBegin();
  45.             RiSurface("constant", RI_NULL);
  46.             RiPolygon(4,                         
  47.         /*Declare the square */
  48.                 RI_P, (RtPointer) Square, RI_NULL);
  49.         RiWorldEnd();
  50.     RiEnd();                                 
  51.             /* Clean up             */
  52.     return 0;
  53. }
  54. ------------------------
  55. To compile use a Makefile with something like this:
  56.  
  57. --------------------------
  58. rib: 1.c 
  59.     cc -g -O -Wall -o rib 1.c -lMedia_s  -lNeXT_s
  60. --------------------------
  61. This gets you going.
  62.  
  63. --
  64.  
  65. Gruss 
  66. Tom
  67. _____________________________________
  68. Thomas Roettig
  69. thomas@nice.usergroup.ethz.ch
  70.