delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/28/23:09:32

From: Jose Manuel Lopez-Cepero <sigma AT ctv DOT es>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro 3d question/bug?
Date: Fri, 28 Mar 1997 22:30:39 +0100
Organization: Unisource Espana NEWS SERVER
Lines: 33
Message-ID: <333C387F.7E61@ctv.es>
Reply-To: sigma AT ctv DOT es
NNTP-Posting-Host: macarena.ctv.es
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hya!

I am programming a small 3d library to use it with Allegro (that's what
_everybody_ is doing, am I wrong? :-)) When I used the fixed point
polygons, sometimes the polygon would be displayed as a band crossing
the screen (just when it is *on the side*, I mean, imagine a cube, I
strafe left and go straight ahead so the cube would be at my right).
The first impulse was to check the projecting routine, and it _had_ part
of the fault (it doesn't provide a trapping when z<0), but not all. I
then moved the lib to floating point, to see if it would help. Nay, it
didn't band the screen; when I was on the side of the polys it died 
with an FPE with the only traceback on some obscure _triangle+1055. So
nice the triangle func ends at about 20 bytes... The instruction pointed
was a 'fldcw', but the instruction above (that theoretically created the
FPE) was a 'fistp' (I have *no* idea on fpu programming...) My impulse
was to use FSDB, but hey, it won't work with graphics modes :-(
I then tracked the possible cause of the error on the drawing of
polygons with *very* (-8000 or so) large coordinates. Elliminating them
solves it, but sometimes one of these falls on the screen and then the
routine dies. Any help? ;)

Another thing is profiling. I can profile it OK but the routine is
_very, very, very_ slow! A scene that was drawn at 36 fps with no
trouble now used 2 seconds for a single frame. There is a routine that
gets called very often (27k times... it is the qsort() classifier), but
hey, that should not be trouble for a profiler when the FAQ says "ron
your program normally" :-)

Thanks in advance
-- 
 _*                        
\ |/_|\/||\                                 sigma AT ctv DOT es      
_\|\/|  ||_\  (formerly Sigmatech)      Jerez / Cadiz / Spain

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019