Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: LoadImage and FntPrint Date: Fri, 25 Sep 1998 14:11:37 +0100 Organization: Sony Computer Entertainment Europe Lines: 55 Message-ID: <360B9689.144C6435@scee.sony.co.uk> References: <6ug1n0$ja96@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 Maurice Sibrandi wrote: > > I'm trying to get some full screen graphics working as a first attempt to create > a marvelous game, but I don't seem to get it right. I want to display a full screen > image with some debug text, but the text won't show. The text is under the image > (I checked that!) although it is plotted after a LoadImage and even after a > DrawSync(0). DrawSync(0) just waits for all GPU commands to complete, it does not affect the order they occur. If you're using FntPrint, then remember that FntPrint alone doesn't print the debug information to the screen - at then end of the frame you have to call FntFlush(-1) (which actually draws the text by dumping all Fnt streams to the GPU). You seem to be doing this though. Another problem might be that you are loading FntPrint's font into VRAM, then wiping over it with a TIM or something. You should see something even if you don't do the LoadImage. Try putting the FntFlush before you swap buffers. > BTW.1 How does the Yaroze handle 320x256 sprites? Performance? The Playstation can only handle sprites up to 256x256 in size. To get a 320x256 sprite, the usual method is to have 2 160x256 sprites next to each other. As for performance, a sprite which is sorted with GsSortFastSprite will draw faster than a sprite drawn with GsSortSprite. Doing a LoadImage from main RAM for every frame is very slow. Instead, LoadImage the picture once into some other area of VRAM and MoveImage it across, it's a lot faster. > BTW.2 What is a nice way to see what the frame rate is? VSync(-1) will return the number of VSyncs since bootup. To get the framerate, go: StartFrame: oldVsync = VSync(-1); ... do stuff... ... DrawSync(0); VSync(0); frameRate = VSync(-1) - oldVSync; > for (i=0; i<8; i++) > if (nFontstream[i] != -1) > FntFlush(nFontstream[i]); > }; > }; Just replace this with FntFlush(-1); Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Handwritten on a condom machine; "This gum tastes funny"