Fantastic book Mike, I've skimmed the book in its entirity once, and I'm reading it again now in hopes of trying to implement the DXUT architecture for the first time. Due to the lack of reference and tutorials on the subject out there outside of the examples of GCC and MSDN (which currently focuses on dx10 function calls).
My current goal is displaying a blank window with the traditional blue background rendering in directx.
Display All
I've been stripping away example code in order to simply get it to work but with no luck. I'm getting an odd linker error "Error 1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib"
I did some research and some of the suggestions where to turn on Multi-byte instead of Unicode which is preffered by the dxut.h header. I'm a little stuck right now.
Thank you.
My current goal is displaying a blank window with the traditional blue background rendering in directx.
C Source Code
- #include "DXUT.h"
- #include "DXUTmisc.h"
- //int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
- INT WINAPI _WinMain( HINSTANCE hInstance, HINSTANCE hPrevIstance, LPSTR lpCmdLine, INT nCmdShow)
- {
- //DXUTInit( true, true );
- //DXUTCreateWindow( L"Example" );
- //DXUTCreateDevice( true, 640, 480 );
- // Custom main loop
- HWND hWnd = 0;//DXUTGetHWND();
- BOOL bGotMsg;
- MSG msg;
- msg.message = WM_NULL;
- PeekMessage( &msg, NULL, 0U, 0U, PM_NOREMOVE );
- while( WM_QUIT != msg.message )
- {
- // Use PeekMessage() so we can use idle time to render the scene
- bGotMsg = ( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) != 0 );
- if( bGotMsg )
- {
- // Translate and dispatch the message
- if( 0 == TranslateAccelerator( hWnd, NULL, &msg ) )
- {
- TranslateMessage( &msg );
- DispatchMessage( &msg );
- }
- }
- else
- {
- // Render a frame during idle time (no messages are waiting)
- //DXUTMainLoop();
- //DXUTRender3DEnvironment();
- }
- }
- return 0;//DXUTGetExitCode();
- }
I've been stripping away example code in order to simply get it to work but with no luck. I'm getting an odd linker error "Error 1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib"
I did some research and some of the suggestions where to turn on Multi-byte instead of Unicode which is preffered by the dxut.h header. I'm a little stuck right now.
Thank you.
http://www.michaelkofman.com/