home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / graphics / opengl / 281 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.2 KB

  1. Path: sparky!uunet!contex!sam.contex.com!james
  2. From: james@sam.contex.com (James McQueston)
  3. Newsgroups: comp.graphics.opengl
  4. Subject: GL sboxf() functionality in OpenGL?
  5. Keywords: sboxf rectf glRect
  6. Message-ID: <3339@contex.contex.com>
  7. Date: 28 Jan 93 23:45:09 GMT
  8. Sender: news@contex.contex.com
  9. Lines: 42
  10.  
  11.  
  12. I have a question about what *seems* to be a piece of GL functionality
  13. not present in OpenGL.
  14.  
  15. In the GL, there are two rectangle drawing functions, rectf() and sboxf();
  16.  
  17. Rectf() draws rectangles that are equivalent to polygons: all four corners
  18. obey the transformation on the matrix stack.
  19.  
  20. Sboxf() however, draws rectangles that are screen-aligned: it behaves as
  21. if only the two diagonal points are sent through the transformation matrix
  22. and then a rectangle is constructed (and filled) in screen space.
  23.  
  24. So sboxf() is less general than rectf(), but when drawing copious
  25. screen-aligned but very small rectangles, sboxf() has half the transformation
  26. cost that rectf() has whenever the drawing bottleneck is the transformation
  27. rate.  A useful [not guaranteed] side-effect of sboxf() is that on all SGI
  28. implementations, it does not decompose the rectangle into triangles when
  29. filling, and so avoids "seeing" triangles "flashing" when drawing large
  30. screen-aligned rectangles in singlebuffer mode.  We use this primitive
  31. a lot, for both of these purposes.
  32.  
  33. The problem is that glRect() seems to be the OpenGL analogue of rectf().
  34. In fact, the man page [of 30 June 1992] states that "glRect2()" is
  35. equivalent to a series of glBegin, glVertex, and glEnd routines,
  36. that to me seem equivalent to GL rectf().
  37.  
  38. 1) What is the "2" in "glRect2?" Is it a typo?
  39. 2) How can one get the very useful functionality provided by GL sboxf()
  40.    from OpenGL?
  41.  
  42. Those at SGI should know that I put this question to an SGI hotline engineer
  43. some time ago, and it resulted in RFE number 113630 (or maybe SCR 112952).
  44. There is some kind of response from Kurt Akeley in that file which seems
  45. to be saying that glRect() can do what Sbox() does.  How can this be
  46. true?
  47.  
  48. -- 
  49. -----
  50. James H. McQueston        james@contex.com
  51. Xyvision Color Systems, Inc.    (617) 246-1776 x 5523 (office, voicemail)
  52. Wakefield MA 01880-1291        (617) 245-4471        (lab phone direct)
  53.