From arbi.informatik.uni-oldenburg.de!vm.gmd.de!VM3090.EGE.EDU.TR!owner-dkb-l Mon Apr 18 15:14:55 1994 Return-Path: Received: by diamant.Informatik.Uni-Oldenburg.DE (Smail-3.1.28.1) id ; Mon, 18 Apr 94 15:14 MET DST Received: by arbi.informatik.uni-oldenburg.de (smail3.1.18 + xalias); Mon, 18 Apr 94 15:15 CES Message-Id: Received: from VM.GMD.DE by vm.gmd.de (IBM VM SMTP V2R2) with BSMTP id 8579; Mon, 18 Apr 94 13:39:05 +0200 Received: from VM.GMD.DE (NJE origin LISTSERV@DEARN) by VM.GMD.DE (LMail V1.2a/1.8a) with BSMTP id 9165; Mon, 18 Apr 1994 13:38:36 +0200 Date: Mon, 18 Apr 1994 18:24:41 +0900 Reply-To: mgix@jpn.thomson-di.fr From: Emmanuel Mogenet Subject: GL driver for POV Comments: To: DKB-L@vm3090.ege.edu.tr To: Multiple recipients of list DKB-L Status: OR For any useful purpose, a GL (i.e., SGI's GL) window output for pov. Replaces xwindows.c. Just replace -lX11 by -lgl_s in makefile. Simplistic but works. ________________________________________________________________________________ Emmanuel Mogenet . PGP Key on Request. MIME Groked. "Faults in bad software can be so subtle as to be practically theological" Bruce Sterling, _The Hacker's Crackdown_ -------ZIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIP-------- #include #include typedef struct Frame_Struct { void *Camera; int Screen_Height; int Screen_Width; void *Light_Sources; void *Objects; } ZORG; extern ZORG Frame; unix_init_POVRAY() {} display_close() {} display_finished() {} static unsigned long *bitmap; display_init() { prefsize( (long)(Frame.Screen_Width), (long) (Frame.Screen_Height) ); winopen( "POV" ); RGBmode(); gconfig(); cpack(0); clear(); bitmap= (unsigned long *) calloc(4,Frame.Screen_Width*Frame.Screen_Height); } display_plot( int x, int y, unsigned char r, unsigned char g, unsigned char b ) { static int count=0; y=Frame.Screen_Height-y-1; bitmap[x+y*Frame.Screen_Width]= (b<<16)|(g<<8)|r; count++; if( !(count%Frame.Screen_Width) || qtest() ) { if( qtest() ) qreset(); lrectwrite(0, 0, Frame.Screen_Width-1, Frame.Screen_Height-1, bitmap); } } -------ZIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIP--------