Original Post
I am currenlty starting of with programming a game engine and I want to eventualy incorporate multithreading extensively but I have a quick question on a simple noob technique. If I were to say have a thread running my graphics renderer code and a thread that runs lets say everthing else or input. Will I gain any performance while I am waiting for a function call in the graphics code, say a operation that takes a while to return, ie. telling the the graphics card to render a scene. Will it if i have a second thread running will it gain more processor time because the other thread is waiting, or will it continue to use same amount of processing just for wasted cycles. Also say I use the Win32 function for Sleep() or other calls to sleep the thread, will the graphic thread get more processing time. In theory i want to sample the input only at a set rate and not between every render loop. If their render is rendering at a horrible 10 frames per second I still want to sample the input every say 100 milliseconds or if the render is rendereing at 500 fps then i do not want to sample the inputs every 2 milliseconds. Sorry this is a newbe approach, just want to ease in to the multithreading, and sorry if I left some details out that would help you answer my question better.