home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 13139 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  2.2 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!rutgers!concert!borg!phoenix.radonc.unc.edu
  2. From: soltys@phoenix.radonc.unc.edu (Mitchel Soltys)
  3. Newsgroups: comp.sys.sgi
  4. Subject: GLX slow rendering problem
  5. Keywords: GL, GLX, shaded rendering
  6. Message-ID: <14891@borg.cs.unc.edu>
  7. Date: 1 Sep 92 14:54:08 GMT
  8. Sender: news@cs.unc.edu
  9. Distribution: usa
  10. Organization: Radiation Oncology, NCMH/UNC, Chapel Hill, NC
  11. Lines: 43
  12.  
  13. under GLX. I am guessing that the problem is that some state is turned
  14. on/off and causing the slow down. Unfortunately I am adding additions
  15. to some old X software and do not know exactly which states may be in
  16. effect. Thus my question:
  17.  
  18. Would someone please tell me what "things" might slow down rendering
  19. under GLX?
  20.  
  21. To be specific, I am comparing a GLX program I wrote to render ~84000
  22. triangles to some GLX code in a MUCH LARGER program. In my code I am
  23. able to render the triangles in ~ .5 secs (no meshes, the old code
  24. doesn't use meshes). In the old code, this section of code:
  25.  
  26. for(i = 0; i < num_triangles;i++){
  27.     bgnpolygon();
  28.     n3f(fake_vector);
  29.     v3f(fake_vector);
  30.     n3f(fake_vector);
  31.     v3f(fake_vector);
  32.     n3f(fake_vector);
  33.     v3f(fake_vector);
  34.     endpolygon();
  35. }
  36.  
  37. takes ~1.6 secs ... more than three times as slow. The fake_vector was
  38. used to make sure that valid values were passed to n3f and v3f. Taking
  39. out the v3f call and leaving only the n3f (just trying to figure out
  40. where the problem is) cuts the rendering time to ~.4 secs in the old
  41. code which leads me to strongly suspect that there is some global
  42. variable set which is interfering with rendering. 
  43.  
  44. The program I am modifying is quite complex, using, stenciling,
  45. texture mapping, multiple windows under X etc. Things I have been
  46. trying include texturing (turned off), subpixel(TRUE). I would like to
  47. be able to guarantee "a clean environment", render dummy triangles
  48. using n3f and v3f in less than .6 secs, and work back from there. But
  49. right now I can't get anything to render quickly. 
  50.  
  51. Much thanks to anyone who can give me a clue as to what may be going
  52. wrong. It may be some stupid mistake in my code, but I haven't found
  53. it yet. Thanks again for any help.
  54.  
  55. Mitchel Soltys
  56.