Present() without actually presenting..

Started by
10 comments, last by Giallanon 12 years, 2 months ago
Yes, this could be true if "main job" and "idle job" were always both queued for scheduling, but this is not always the case.
I'm not sending the "main gpu job" every frame, I'm sending it every now and then.
Using big numbers just to be clear, let's say I send a "main gpu job" every 10 seconds; GPU receive it and display it using Present().
I still don't see why you can't put both jobs into the same begin/end scene pair, like:void main()
{
beginScene();
while(!quit)
{
if( maybe1 )
doIdleJob();
if( maybe2 )
{
doMainJob();
endScene();
present();
beginScene();
}
}
endScene();
}


Also (but this is a minor issue that can be solved with a LockRect as stated in the 2nd post) without calling Present() you can't be sure that after EndScene() the GPU will flush the pipeline and actually do its job
Why do you need to manually flush the pipeline and ensure that the GPU has completed it's job? That detail is automatically managed -- the job will be completed before you use it's results. If you don't use it's results, you can't be sure it's completed yet, but you don't need to be sure because you're not using the results...
Advertisement
Yes, I think you're right. I just have to beginscene() and let it open until someone want to present something to the screen. When this happen just endscene() and present(). Thank you for helping

This topic is closed to new replies.

Advertisement