From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro 3d question/bug? Date: Tue, 1 Apr 1997 20:40:38 +0100 Organization: None Distribution: world Message-ID: References: <333C387F DOT 7E61 AT ctv DOT es> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 35 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Jose Manuel Lopez-Cepero writes: >_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 Are these polygons very large? If so, that sounds to me like an overflow problem: there's a limit to the range of values that will fit into a fixed point number! If that isn't the case, send me an example of some code that demonstrates this trouble and I'll see what I can do... >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? ;) The solution to this is to clip the polygons before drawing them, rather than trying to scan convert something really huge and just relying on Allegro to clip it during the rasterising stage. Ideally, of course, there should be a 3d polygon clipper function in Allegro: anyone got a nice one they feel like donating? >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 I wouldn't spend too much time worrying about that. In my experience of using the profiler, it does slow things down a _lot_, but it seems to be pretty good at discounting the time spent running it's own code, so it still gives a fairly accurate breakdown of where the bottlenecks in your code are. -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.