I am trying to create a game engine using multiple threads and Direct X. I can't figure out how to create a new thread using Direct X. If anyone knows how and is willing too tell me I would really appreciate it? Thanx
: I am trying to create a game engine using multiple threads and Direct X. I can't figure out how to create a new thread using Direct X. If anyone knows how and is willing too tell me I would really appreciate it? Thanx :
code : //this is the thread function void HandleNotifications(LPDWORD ) { //any code } //////////add this to your main DWORD dwThreadID; HANDLE thread; if ((thread=CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)HandleNotifications, NULL, 0, &dwThreadID)) == NULL) return FALSE; SetThreadPriority(thread, THREAD_PRIORITY_LOWEST ); ResumeThread(thread); /////////
Comments
:
code :
//this is the thread function
void HandleNotifications(LPDWORD )
{
//any code
}
//////////add this to your main
DWORD dwThreadID;
HANDLE thread;
if ((thread=CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)HandleNotifications, NULL, 0, &dwThreadID)) == NULL)
return FALSE;
SetThreadPriority(thread, THREAD_PRIORITY_LOWEST );
ResumeThread(thread);
/////////