Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info. |
Difference between revisions of "IRIS GL"
Jump to navigation
Jump to search
(Created page with "IRIS GL (Integrated Raster Imaging System Graphics Library) was a proprietary graphics API created by Silicon Graphics for producing 2D and 3D computer graphics on their I...") |
|||
Line 1: | Line 1: | ||
+ | <html> | ||
+ | <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | ||
+ | <!-- misc-responsive --> | ||
+ | <ins class="adsbygoogle" | ||
+ | style="display:block" | ||
+ | data-ad-client="ca-pub-8542359430745061" | ||
+ | data-ad-slot="5971110325" | ||
+ | data-ad-format="auto" | ||
+ | data-full-width-responsive="true"></ins> | ||
+ | <script> | ||
+ | (adsbygoogle = window.adsbygoogle || []).push({}); | ||
+ | </script> | ||
+ | </html> | ||
+ | |||
IRIS GL (Integrated Raster Imaging System Graphics Library) was a proprietary graphics API created by [[Silicon Graphics]] for producing 2D and 3D computer graphics on their IRIX based IRIS graphical workstations. Later sgi (Silicon Graphics, Inc.) removed their proprietary code, reworked various system calls, and released IRIS GL as the industry standard [[OpenGL]]. | IRIS GL (Integrated Raster Imaging System Graphics Library) was a proprietary graphics API created by [[Silicon Graphics]] for producing 2D and 3D computer graphics on their IRIX based IRIS graphical workstations. Later sgi (Silicon Graphics, Inc.) removed their proprietary code, reworked various system calls, and released IRIS GL as the industry standard [[OpenGL]]. | ||
Revision as of 23:54, 26 September 2018
IRIS GL (Integrated Raster Imaging System Graphics Library) was a proprietary graphics API created by Silicon Graphics for producing 2D and 3D computer graphics on their IRIX based IRIS graphical workstations. Later sgi (Silicon Graphics, Inc.) removed their proprietary code, reworked various system calls, and released IRIS GL as the industry standard OpenGL.
History
See OpenGL section History.
Example
IrisGL is straight forward, an example for a simple screensaver:
//ssaver.cpp //written by Ruud van Gaal //ruud at racer dot nl //compile with CC -o saver ssaver.cpp -lgl -ldmedia //note that IrisGL is linked with lowercase gl while //OpenGL is linked with uppercase gl (-lGL) #include <gl/gl.h> #include <gl/device.h> #include <dmedia/dmedia.h> void Line(int x1,int y1,int x2,int y2) { short v[2]; bgnline(); v[0]=x1; v[1]=y1; v2s(v); v[0]=x2; v[1]=y2; v2s(v); endline(); } #define MAXX 1280 // getgdesc(GD_XPMAX) #define MAXY 1024 void main(int argc,char **argv) { int x1,y1,x2,y2; int v[2][2]; prefsize(1280,1024); winopen("GL window"); RGBmode(); doublebuffer(); //viewport(0,768,0,576); fullscrn(); gconfig(); //winposition(100,200,100,200); //imakebackground(); clear(); v[0][0]=1; v[0][1]=2; v[1][0]=3; v[1][1]=4; x1=100; y1=150; x2=400; y2=400; qdevice(ESCKEY); clear(); swapbuffers(); clear(); //swapbuffers(); while(1) { cpack(0); clear(); x1=x1+v[0][0]; if(x1<0||x1>=MAXX){ v[0][0]=-v[0][0]; x1=x1+v[0][0]; } y1=y1+v[0][1]; if(y1<0||y1>=MAXY){ v[0][1]=-v[0][1]; y1=y1+v[0][1]; } x2=x2+v[1][0]; if(x2<0||x2>=MAXX){ v[1][0]=-v[1][0]; x2=x2+v[1][0]; } y2=y2+v[1][1]; if(y2<0||y2>=MAXY){ v[1][1]=-v[1][1]; y2=y2+v[1][1]; } cpack(0xFFFFFFFF); Line(x1,y1,x2,y2); swapbuffers(); if(qtest()) { short data; if(qread(&data)==ESCKEY) break; } } }