Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: LoadImaga and FntPrint Date: Sat, 26 Sep 1998 12:23:33 +0100 Organization: Sony Computer Entertainment Europe Lines: 47 Message-ID: <360CCEB5.F14D6B01@scee.sony.co.uk> References: <6ug1n0$ja96@chuka.playstation.co.uk> <6uidgd$ja915@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b1 [en] (Win95; I) X-Accept-Language: en Ok, solved. The problem is twofold: 1) You are LoadImaging the image into the right area at the wrong time. 2) You were doing a GsSortClear, which is only necessary if you are using a large image as the background. This meant that you were clearing the screen, drawing the drawing the debug text, then loading the image over the top of it all. The GsDRAWENV variable holds information about the CURRENT drawing area. This can get quite confusing, because the current drawing area (which is what the GPU is using), is NOT the same as the area which the CPU is building its packets for in the OT. Remember, the screen is displaying buffer X, the GPU's drawing area is set to buffer 1-X, and the CPU is building packets up for the new buffer X. The following code works fine: Maurice Sibrandi wrote: > > GsClearOt(0, 0, &otWorld[nActiveBuf]); // Clear the OT for buffer X > > FntPrint(nFontstream[0], "~c090No problem : this text is visible"); > > // Create packets and sort objects in here... > > // wait for end of non-blocking routines and wait for vsync > DrawSync(0); > VSync(0); > GsSwapDispBuff(); > // Load in the new background > setRECT(&rc, 0, GsDRAWENV.clip.y, imgBack.pw, imgBack.ph); > LoadImage(&rc, imgBack.pixel); > // Draw the new objects on top of the background > GsDrawOt(&otWorld[nActiveBuf]); > // Draw the debug info on top of that. > FntFlush(-1); Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe A cynic smells flowers and looks for the casket.