From: Kevin D. Quitt (KQuitt@ieeinc.com)
Date: Fri 01 Jun 2001 - 22:15:03 IDT
OK, I'm an idiot. This program has an array of bytes (320x240) that I want
to display on the screen. I get a segmentation fault at the call to
gl_putbox. Help!
/* CK.C 10-Nov-00 14:35:34 by Kevin D. Quitt
First test of SVGAlib.
*/
#include <stdio.h>
#include <stdlib.h>
#include <vga.h>
#include <vgagl.h>
#include "ck0.c"
int VGAMODE;
int VIRTUAL;
GraphicsContext *physicalscreen;
void setBox( void *theBox )
{
gl_putbox( 0, 0, 320, 240, theBox );
gl_copyscreen( physicalscreen );
putchar( '\a' );
getchar();
}
int main()
{
vga_init();
VGAMODE = vga_getdefaultmode();
vga_setmode( VGAMODE );
gl_setcontextvga( VGAMODE );
physicalscreen = gl_allocatecontext();
gl_getcontext( physicalscreen );
setBox( ck0bmp );
putchar( '\a' );
getchar();
vga_setmode( TEXT );
return EXIT_SUCCESS;
}
and ck1.c has:
ulong ck1bmp[] = {
0xAEAEAEAE, 0xAEAEAEAE, 0xAEAEAEAE, 0xAEAEAEAE,
(etc.)
}
--
_
Kevin D. Quitt KQuitt@ieeinc.com
96.37% of all statistics are made up
------------------------------------------------------------------
Unsubscribe: To: listbot@svgalib.org
Body: unsubscribe linux-svgalib
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST