home *** CD-ROM | disk | FTP | other *** search
- #include "pico.h"
-
- #ifdef sgi
- #include <gl/gl.h>
- static void initdisplay() {
- static init;
- if (!init) {
- init = 1;
- prefposition(200, 199 + DEF_X, 200, 199 + DEF_Y);
- foreground();
- winopen("pico");
- RGBmode();
- gconfig();
- }
- }
-
- /*
- pico works with [0,0] in the top left, but sgi windows put it in
- the bottom left
- */
-
- extern void display(unsigned char *data) {
- unsigned long scr[DEF_X * DEF_Y];
- int i,j;
- initdisplay();
- for (i = 0, j = DEF_X*(DEF_Y-1); i < DEF_Y*DEF_X; i++, (++j&(DEF_X-1)) || j -= 2*DEF_X)
- scr[j] = data[i] | (data[i]<<8) | (data[i]<<16);
- lrectwrite(0, 0, DEF_X - 1, DEF_Y - 1, scr);
- }
- #else
- extern void display(unsigned char *data) {
- }
- #endif
-