This site is no longer active and is available for archival purposes only. Registration and login is disabled.

how to render into the frontbuffer using Direct3D Mobile?


how to render into the frontbuffer using Direct3D Mobile?

Postby hamster » Apr 6, 2006 @ 3:07pm

User avatar
hamster
pm Member
 
Posts: 10
Joined: Mar 1, 2006 @ 10:26am


Postby Digby » Apr 7, 2006 @ 11:05pm

How are you timing the Present call?

Realize that D3DM buffers all of your rendering commands until it absolutely must send them to the driver. For most games, this will be when the app calls Present. For this reason, if you are simply recording the elapsed time of Present, you are also measuring the time it takes the driver to parse and execute everything already in the command buffer since the last flush of commands to the driver.

If you want to measure the speed of the Present call alone, then you can force a flush of the command buffer by adding a call to lock/unlock the back buffer just prior to starting your timing of Present.

The Present operation from the back buffer to the front buffer should be performed in hardware on the 2700G, so that shouldn't be a bottleneck in your app.

For most games, optimum performance will occur when running fullscreen, with the swapeffect set to discard, and the presentation interval set to immediate (this could cause tearing though).

If you're running in a window, make sure that your back buffer is the same size as the window's client rect and that the pixel format is the same as the primary surface. You don't want the driver to do any sort of conversion (stretch/shink/color) during each Present.
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby hamster » Apr 8, 2006 @ 10:53pm

User avatar
hamster
pm Member
 
Posts: 10
Joined: Mar 1, 2006 @ 10:26am


Postby Digby » Apr 10, 2006 @ 10:36pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby hamster » Apr 10, 2006 @ 11:25pm

User avatar
hamster
pm Member
 
Posts: 10
Joined: Mar 1, 2006 @ 10:26am


Postby Digby » Apr 11, 2006 @ 12:27am

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby hamster » Apr 11, 2006 @ 10:44pm

User avatar
hamster
pm Member
 
Posts: 10
Joined: Mar 1, 2006 @ 10:26am


Postby Digby » Apr 12, 2006 @ 10:23pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron