Jump to content
  • Advertisement
Sign in to follow this  
jlewicki

dx9 tuts/samps

This topic is 4538 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

Advertisement
On the main loop? Do you mean the render loop? Hmm… well the DirectX SDK tutorials do use a nice way of processing the main loop. But if tutorials are what you are looking for, then try these links.

CodeSampler, Arguably once of the best sites for DirectX tutorials.
Andy Pike, Some good introduction tutorials, sort of NeHe-ish.

Just Google for more, you’ll find them.
Just in case, if you want to see how I run my main loop ->


// Initialize the message queue
//
memset( &Msg, 0, sizeof( MSG ) ) ;
Msg.message = WM_NULL ;
Msg.wParam = 0 ;
Msg.lParam = 0 ;

// Retrieve any pending messages
//
PeekMessage( &Msg, NULL, 0, 0, PM_NOREMOVE ) ;

bGotMsg = FALSE ;

while ( WM_QUIT != Msg.message )
{
// While active, just peek for messages
// Or else, wait for them
//
if ( TRUE == g_bIsAppActive )
{
bGotMsg = ( PeekMessage( &Msg, NULL, 0, 0, PM_REMOVE ) != 0 ) ;
}
else
{
bGotMsg = ( GetMessage( &Msg, NULL, 0, 0 ) != 0 ) ;
}

// Process the messages received if any
//
if ( TRUE == bGotMsg )
{
TranslateMessage( &Msg ) ;
DispatchMessage( &Msg ) ;
}
else if ( TRUE == g_bIsAppActive )
{
// TODO : Handle runtime processing!!

}
}


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!