Path: chuka.playstation.co.uk!news From: Nick Slaven Newsgroups: scee.yaroze.freetalk.english Subject: Re: Is my Yaroze faulty? Date: Fri, 01 May 1998 22:00:41 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 53 Message-ID: <354A37F6.CD739A25@compuserve.com> References: <3549FEDD.6D64@writeme.com> NNTP-Posting-Host: ld40-199.lon.compuserve.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) To: James Rutherford Nope, it happens on mine as well. The problem lies in the fact that you have declared you're GLbground as a local (non static) variable in the function DrawGradient. Because of the way c defines such variables they cannot be relied on existing outside this function. Usually they are allocated dynamically on the stack, and so are destroyed when you leave the function. As far as I understand it, the GSDrawGLine, and GSDrawOT functions return immediately as the real work is carried out by GTE/GPU in parrallel (please correct me if I'm wrong). So what in actual fact is happening is that the data area that GSDrawGLine is pointing to when you leave the function, is not valid and has been corrupted when GTE/GPU comes to process the information in it. Defining GLbground as static within the function or global outside the function will sort out your probs, as pete says. Hope this helps, cheers Nick Slaven James Rutherford wrote: > Desperately seeking some kind soul... > > I've come across some wierd kind of problem with code I knocked up last > night. It was intended to be some kind of graduated background effect, > but comes out all streaky. > > I would have posted this to 2d, compiler or coding newsgroups - but I > don't believe its a problem with any of those. > > I'd be very grateful if you'd pop along to: > > http://www.netyaroze-europe.com/~mrfrosty/ftp/rentakil/fixme.zip > > - and see if your Yaroze messes up like mine. > > Cheers, > > James (~mrfrosty) > 'Who ya gonna call?...'