Delay upon first call to SceneInterface.BeginFrameRendering(...)

rated by 0 users
This post has 5 Replies | 3 Followers

Top 10 Contributor
Posts 783
SunBurn_Community_Licensee
SunBurn_Contributor
CJ Bailey Posted: 12-02-2010 11:12 AM

When my code makes it's first call to SceneInterface.BeginFrameRendering(), there appears to be a delay of a few seconds.  Subsequent calls are fine.  I presume this is due to some initialisation behind the scenes.

However, it's annoying because once the Sunburn splash has finished you then get this delay where the screen is just blank.  It's not a long delay I know, but it kind of seems unprofessional to have this blank screen.

Is there anyway around this?  e.g. performing whatever initialisation during the display of the splash screen.

Top 10 Contributor
Posts 783
SunBurn_Community_Licensee
SunBurn_Contributor

Think I've just answered my own question.

I make sure the first call to SceneInterface.BeginFrameRendering() is during the display of my own splash screen, therefore hiding the delay.

:)

Top 10 Contributor
Posts 1,214
SunBurn_Community_Licensee
SunBurn_Contributor
SunBurn_Pro_Licensee

Congratulations! You're definitivelly very active in the forums: you answer your own posts :)

 

Top 10 Contributor
Posts 783
SunBurn_Community_Licensee
SunBurn_Contributor

Haha!  I like to be able to help.... even if it is myself!  ;-)

Sometimes I post questions without first thinking them through properly.

Top 50 Contributor
Posts 95
SunBurn_Community_Licensee

I have this same problem.  But, I can't get the splash screen to show.  Any idea on how that's implemented?

Top 10 Contributor
Posts 4,854
Employee
SunBurn_Studio_Licensee

Hi Jeff,

A lot of people use screens for this, displaying first your splash screen, then switching to the screen that renders your scene / game.

Make sure at least one entire Game.Draw() method completes and renders an image to the screen before rendering the scene (eg: the scene renders after, not during, the first frame).  With this setup the image rendered during the first frame will remain visible during any delay when first displaying / loading the scene.

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Page 1 of 1 (6 items) | RSS