ha90353@UXA.CSO.UIUC.EDU (Homayoon Akhiani) (07/12/89)
We are doing real-time simulation using iris 3000 series. In the gl2 library I found routines which are not documented in the manuals, but are very fast: gl_sincos() calculates sin and cos of a angle in about 10 times faster than the math and floating point library. gl_identifymatrix() whichpush and loads an identity matrix. Does anyone has any information about the routines that are in the gl library which is not documented ? ------------------------------------------------------------------------- Homayoon Akhiani University of Illinois at Urbana/Champaign Aviation Research Lab <ha90353@uxa.cso.uiuc.edu> <akhiani@s.cs.uiuc.edu> -------------------------------------------------------------------------
tarolli@dragon.wpd.sgi.com (Gary Tarolli) (07/14/89)
In article <8907112203.AA22556@uxa.cso.uiuc.edu>, ha90353@UXA.CSO.UIUC.EDU (Homayoon Akhiani) writes: > > We are doing real-time simulation using iris 3000 series. > In the gl2 library I found routines which are not documented > in the manuals, but are very fast: > gl_sincos() calculates sin and cos of a angle in about 10 times > faster than the math and floating point library. > gl_identifymatrix() whichpush and loads an identity matrix. > > Does anyone has any information about the routines that are > in the gl library which is not documented ? > > ------------------------------------------------------------------------- You would be wise not to use internal GL routines as they are not guarenteed to be the same, or even exist on all machines. Yes, gl_sincos() is a fast table lookup that appears in all GL's. Use it if you like, but don't call us if it breaks or disappears. gl_identifymatrix simply sets a matrix to the Identity matrix. Both of these routines are fairly trivial and so to be safe you should write them yourself so they are in your code. That way things are in your control and even if they disappear from the GL you wont care. There might be other routines in the GL that could help you out. But that is not the right way to go about optimizing your code. First identify your bottlenecks using prof or other profiling tools. Then optimize the critical sections. Chances are, your application's needs are slightly different from the GL's and so a customized gl_sincos() routine might be more optimal for your application. -- Gary Tarolli