Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: "Steve Spiller" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Screen flicker Date: Mon, 19 Oct 1998 09:50:35 -0700 Organization: SCEA News Server Lines: 33 Message-ID: <70fpvs$c893@scea> References: <36278d19.18773715@news.playstation.co.uk> <7081ou$alr7@scea> <3628a5ea.2751668@news.playstation.co.uk> NNTP-Posting-Host: gateway.connext.com X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Well, you have a global variable currentBuffer that will be used when you sort your object in your main loop. But, in your RenderWorld() function you define a new instance of currentBuffer that is local to the function. So, your global currentBuffer never gets updated and you are always drawing to the same OT when you are sorting your objects. Simply remove the 'int' from in front of currentBuffer = GsGetActiveBuff() and you should be set. :) -Steve Jack wrote in message <3628a5ea.2751668@news.playstation.co.uk>... >int currentBuffer; > >void RenderWorld() > { > //int i; > int currentBuffer = GsGetActiveBuff(); > GsSetWorkBase((PACKET*)Packet_Memory[currentBuffer]); > GsClearOt(0, 0, &OT[currentBuffer]); > FntPrint("hi everyone, my first program!!!\n\n"); > FntFlush(-1); > //drawGame(&OT[currentBuffer]); > DrawSync(0); > VerticalSync = VSync(0); > GsSwapDispBuff(); > GsSortClear(0, 0, 0,&OT[currentBuffer]); > GsDrawOt(&OT[currentBuffer]); >};