Sign in to follow this  

dx9 tuts/samps

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

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

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