Path: chuka.playstation.co.uk!news From: Scott Campbell Newsgroups: scee.yaroze.beginners Subject: Re: Still trying to display a sprite Date: Sun, 22 Mar 1998 13:46:33 -0800 Organization: PlayStation Net Yaroze (SCEE) Lines: 118 Message-ID: <351586B9.1FD0@aol.com> References: <351380C8.73EA@aol.com> <35132D2E.8D466F27@netmagic.net> NNTP-Posting-Host: 170-59-244.ipt.aol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I) Thanks for the suggestion, but still no luck. I cannot help but think it must be something other than the order of my main loop. After all, it is basically a straight cut and paste from the start up guide code or even Ira Rainey's tutorial code. Any other suggestions? (Please) ScoTT. p.s I've removed the code from this message so as not do keep perpetualy duplicating it. ------------------------------------------------------------- ScoTT Campbell CS3 Computing Science Dept. University of Glasgow E-Mail: campbels@dcs.gla.ac.uk or SCampb8044@aol.com Visit me: www.dcs.gla.ac.uk/~campbels or www.netyaroze-europe.com/~escotia (Member's only) ------------------------------------------------------------- "The first rule is not to lose. The second rule is never to forget the first rule." - Warren Buffet -------------------------------------------------------------------------- Elliott Lee wrote: > > I think that you have the ordering wrong, which is why things are > getting messed up. > > In general, you should have the GsSortClear() call to clear everything > in the frame buffer, but you don't have to. The order of your calls > is (just to be more compact): > > while{ > GsGetActiveBuff(); > GsSetWorkBase(); > GsClearOt(); > GsSortFastSprite(); > DrawSync(); > VSync(); > GsSwapDispBuff(); > GsSortClear(); > GsDrawOt(); > } > > Let's take a step back before we go over this first. The GPU and > the CPU are two completely separate units. The way graphics get > plopped on the screen is for the CPU to tell the GPU where the > Ordering Table ("laundry list" :P) is and when to begin drawing. > So, you stack the things to be drawn into the OT in the order > you want to see them rendered, hence all the GsSort???() > functions. > When you have your OT all set up the way you want it, you tell > the GPU to begin drawing it by calling GsDrawOt(). Then you > have to WAIT for the GPU to finish drawing before you can tell > it to draw something again. The only way to stop the GPU is > to send a reset signal to it. BUT, while the GPU is rendering > one set of graphics in one frame, you should be creating and > sorting your next graphics in the new OT. So, the flow of > events should be: > > 1. Tell the GPU to start drawing > 2. Logically switch OTs so you're going to operate on > the OT that ISN'T currently being read by the GPU. > 3. Clear that OT---if you don't, you'll still have > all of your old drawing commands in there! (You > can do some interesting effects with this.) > 4. Order all of your new graphics in the OT. > 5. Wait for the end of drawing of the GPU. > 6. Wait for the vertical retrace. (You don't have to > do this, but I would HIGHLY recommend it to avoid > flicker.) > 7. Swap the display buffers. (This is not the same > as logically switching the OTs above.) > 8. Go back to step 1. > > The way you have the above set up, you begin drawing the OT > and then you almost immediately clear it. I looked at some of the > code that I've been writing, and the order is a little > different. Try this: > > while{ > DrawSync(); > VSync(); > GsSwapDispBuff(); > GsGetActiveBuff(); > GsSetWorkBase(); > GsClearOt(); > GsSortClear(); > GsSortFastSprite(); > GsDrawOt(); > } > > Hopefully this will work... :) > - e! > > Scott Campbell wrote: > > > > I have been beating my head against a brick wall. So before it does any > > damage........ > > > > Could someone PLEASE have a look at the code attached and tell me why > > when the GsSortClear call is taken out the sprite is displayed against > > the brick background, BUT when I insert this command back in the same > > place as in all the examples the screen clears and NO sprite is > > displayed. > > > > AND, why can't I get .h files to work, even if I specify full paths or > > put them in the same location as the source. Any demo's I download > > compile fine!! > > > > Thanks in advance. > > > > ScoTT------------------------------------------------------------------------