Hi there.
i'm relatively new to directx.
I have a message loop from a book called Introduction to 3d Game Programming with Directx 9.0
here it is:
could someone clear this up for me please.Code:int d3d::EnterMsgLoop( bool (*ptr_display)(float timeDelta) ) { MSG msg; ::ZeroMemory(&msg, sizeof(MSG)); static float lastTime = (float)timeGetTime(); while(msg.message != WM_QUIT) { if(::PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); } else { float currTime = (float)timeGetTime(); float timeDelta = (currTime - lastTime)*0.001f; ptr_display(timeDelta); lastTime = currTime; } } return msg.wParam; }
i understand a little, but not all of it.
thanks if anyone replies.
EDIT:
Oh yes, and what is HRESULT?



LinkBack URL
About LinkBacks


