help with 3d kit

Search this archive.

From: ivan (ivan@svgalib.org)
Date: Sun 10 Oct 1999 - 13:22:14 IST


hi,

i seem to be having trouble with the 3d kit in that the demo prog 'plane'
will run in mode 1024 x 768 using write-page flipping but the demo
'wrapdemo' segfaults and dumps core in this mode - in fact, wrapdemo won't
run in anything higher than 360 x 480.

i've also noticed that neither of the progs will run in the no page
flipping mode.

i discovered this problem because i am trying to run the small program
written by somebody else that appears below. this dumps core every time i
run it.

the compile command i am using is :

gcc -O3 -Wall -o octagon octagon.c 3dinit.o 3dkit.o quickmath.o striangle.o
swtriangle.o triangle.o wtriangle.o wrapsurf.o -lvgagl -lvga


anyone can help ?

if you want core file or libvga.conf pls ask.

tia

ivan



<---CUT HERE--->

#include <vga.h>
#include <vgagl.h>
#include "triangle.h"

int main(void)
{
   int c = 3,
       bf = -1;

   vga_init();
   vga_setmode(G640x480x16);
   gl_setcontextvga(G640x480x16);

   gl_striangle(270, 223, 303, 190, 320, 240, c, bf);
   gl_striangle(303, 190, 336, 190, 320, 240, c, bf);
   gl_striangle(336, 190, 370, 223, 320, 240, c, bf);
   gl_striangle(370, 223, 370, 256, 320, 240, c, bf);
   gl_striangle(370, 256, 336, 290, 320, 240, c, bf);
   gl_striangle(336, 290, 303, 290, 320, 240, c, bf);
   gl_striangle(303, 290, 270, 256, 320, 240, c, bf);
   gl_striangle(270, 256, 270, 223, 320, 240, c, bf);

   vga_getch();
   vga_setmode(TEXT);
   return(0);
}

<---CUT HERE--->
========================================================================
This random collection of pixels proudly presented by ...
 _____                  __  __      _____                          _     
|_   _|                |  \/  |    |  __ \                        | |    
  | |_   ____ _ _ __   | \  / | ___| |  | | ___  _ __   __ _  __ _| |__  
  | \ \ / / _` | '_ \  | |\/| |/ __| |  | |/ _ \| '_ \ / _` |/ _` | '_ \ 
 _| |\ V / (_| | | | | | |  | | (__| |__| | (_) | | | | (_| | (_| | | | |
|_____\_/ \__,_|_| |_| |_|  |_|\___|_____/ \___/|_| |_|\__,_|\__, |_| |_|
My daily exercise consists of stretching friendships          __/ |      
jumping to conclusions and running away from problems        |___/      

=========================================================================


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST