When I start my 3D engine and load scene etc., I output text on the Window to show progres.
- scene file loaded
- d3d device initialized
Before I enabled the debug version of D3D (instead of retail) version, everything worked fine. Now in debug, I get notes about 'present' cannot we between beginscene and endscene. I've read that this might have to do that my graphic card supports it (retail mode) but some others might not.
I figured, let's solve it so it works always.
Can anyone give me some pointers on what I might be doing wrong?
(by the way, my print function counts the line number in the object, goes one up after each call)
Here's the sample code:
[source lang="cpp"]_d3d.mD3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), NULL, 0);// compiling those 4 lines and the 4 lines below, gives as result:// green background color, first line of text not shown, 2nd line (code below) shown on black //background_d3d.mD3ddev->BeginScene();_d3d.mD3dFont.Print((char*)console_initdi);_d3d.mD3ddev->EndScene();_d3d.mD3ddev->Present(NULL, NULL, NULL, NULL);// do other stuff// only compiling these 4 lines of code, shows text correctly_d3d.mD3ddev->BeginScene();_d3d.mD3dFont.Print((char*)console_loadscn);_d3d.mD3ddev->EndScene();_d3d.mD3ddev->Present(NULL, NULL, NULL, NULL);[/source]
Edited by cozzie, 25 November 2012 - 03:34 PM.