Direct3D FAQ

Link Error:Unresolved symbol _main

Why is my frame rate only 50/60/75/100 when I'm only drawing 1 triangle?

Link Error:Unresolved symbol _main

This error occurs if you create your project as a Console Application. Make sure you create it as a Win32 Application (which uses WinMain rather than main) and it should work fine.

Why is my frame rate only 50/60/75/100 when I'm only drawing 1 triangle?

By default the display is only updated in sync with the vertical refresh. If you want to have your frames presented as fast as possible then specify D3DPRESENT_INTERVAL_IMMEDIATE for the PresentationInterval in your Presentation Parameters when you create the device.

D3DPRESENT_PARAMETERS pp;

   pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
   //Other members need to be set as well, but aren't shown here.

See this article for more information on creating a D3D device.

Back