delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/10/21:19:09

From: "Josh Anderson" <randerso AT win DOT bright DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Weird problems
Date: Wed, 10 Sep 1997 19:02:54 -0500
Organization: BrightNet Wisconsin
Lines: 29
Message-ID: <5v7cbh$le2@reggie.win.bright.net>
NNTP-Posting-Host: mil1-cs-1.win.bright.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

 I have taken my first stab at writing a tri filling routine.  And I'm
having a few problems.  The problem is not with the algorithm itself, I'm
sure this works.  But ocassionally certain points of the triangles bounce
around a lot (usually increasing my a couple hundred on the x-axis) as my 3D
object rotates.   Now this behaivor never showed up in any of my tests of
drawing random triangles every time I pressed a key (I overlayed the tri
with lines to be certain by calling line() from main).  I think the problem
may be some sort of memory leak, and that this is causing the distortions.
I know this because when I placed the calls for line into tri() these lines
were distorted too.

tri starts out like this

void tri(float x1, float y1, float x2, float y2, float x3, float y3, int c)
   {
   float dx1, dx2, dx3, h1, h2, h3;
   int y;
   .
   .

Now, there *should* be room for that shouldn't there be??? Oh, and by the
way, I modified it to take a pointer to a list of floats, and this only made
the distortions show up in more triangles.

Any ideas?????? Any ideas at all??????????????????




- Raw text -


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