Sign in to follow this  

(more) GAPI and sound questions, as well as general game dev concepts

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hiya, I'm currently trying to make a very simple little game for the PocketPC (having a sucky 200Mhz XScale myself). The thing is, I'm currently using: * FMOD for playing back MP3's/OGG's (going to change to PortAudio) * GDI I've also got a poorly implemented GAPI GFX plugin, which is what I'd like help with. The GDI works perfectly smoothly and fine when I replace the FMOD plugin with a NULL sound plugin. But when the MP3's come a rolling, things become very jerky. With the GAPI plugin, things are a lot smoother, but jerk every now and then. The way I've implemented the GAPI plugin is: I create my own buffer, into which I draw a background, a control overlay, and several sprites, which I then flip into the buffer that GXBegin returns. Now, what I'd like to know is: the buffer that is returned by GAPI, is it a direct-to-screen buffer? Would writing to it be slower than using the buffer I've created? If not, would drawing only the changed areas directly to the GAPI buffer be quicker than blitting the entire double buffer? Also, I'm using either a fast timer, or a tight loop where I Sleep(0) in for my main game loop (in which case I lose some stylus input...?), how do you make a fast GAPI game loop? Do you need to handle paint messages? Any opinions would be appreciated, thanks. (Except: I'm not interested in using GapiDraw, I want to do this myself)

Share this post


Link to post
Share on other sites
GXBeginDraw can return a pointer to an intermediate buffer that isn't the true frame buffer. When your app calls GXEndDraw, the driver copies the contents of the intermediate buffer to the actual display RAM. You can determine that this is happening by calling GXIsDisplayDRAMBuffer. If that returns TRUE, then you won't want to manage your own back buffer as you'll be performing an unnecessary copy each frame. Just compose your frame to the buffer returned by GXBeginDraw and let the driver do the copying.

If you're running fullscreen, you don't need to worry about paint messages since you're clobbering the whole screen with your GAPI update each frame.

Do yourself a favor and visit the dev forums on www.pocketmatrix.com. Lot's of competent people there that have been through what you're going through for years.



Share this post


Link to post
Share on other sites

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this