Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualcozzie

Posted 25 December 2012 - 11:02 AM

Hi, I'm trying to show some initialization texts while starting my d3d engine, loadings meshes, shaders etc.. When I run in windowed mode, my drawtext (LP3DXFONT) all works fine and the result is visiblhe through "present" calls. However when I do the same fullscreen, I get either: - no texts shown - and/or D3D debug errors saying assertion failed with bPresentSubmitted (probably because I'm trying to present something while not ready yet). It looks like initizing fullscreen (device) takes longer then windowed, causing this to happen. I tried to add a check for TestCooperativeLevel before 'printing' and presenting the load texts, this didn't help. What I know is that adding a sleep(100) somehere in the startup, solves the problem. But that's the cheap way I guess. Do you have experience with this/ and or do you know if there's a d3d function to check if calling dev->present will bring something on screen? (testcooperativelevel seems to give D3D_OK anyway, even when the screen ísn't presenting anything/ able to present) It by the way also happens when I load my meshes into d3dpool_managed instead of systemmem. Found it that adding a Sleep(20) in my render function, right before present, also solved it here. Probably missing something as check before 'presenting' the BackBuffer. Any help would be appreciated, it might be quite simple but for now very annoying...


#3cozzie

Posted 23 December 2012 - 08:46 AM

Hi,

I'm trying to show some initialization texts while starting my d3d engine, loadings meshes, shaders etc..
When I run in windowed mode, my drawtext (LP3DXFONT) all works fine and the result is visiblhe through "present" calls.

However when I do the same fullscreen, I get either:
- no texts shown
- and/or D3D debug errors saying assertion failed with bPresentSubmitted
(probably because I'm trying to present something while not ready yet).

It looks like initizing fullscreen (device) takes longer then windowed, causing this to happen.
I tried to add a check for TestCooperativeLevel before 'printing' and presenting the load texts, this didn't help.

What I know is that adding a sleep(100) somehere in the startup, solves the problem. But that's the cheap way I guess.

Do you have experience with this/ and or do you know if there's a d3d function to check if calling dev->present will bring something on screen? (testcooperativelevel seems to give D3D_OK anyway, even when the screen ísn't presenting anything/ able to present)

It by the way also happens when I load my meshes into d3dpool_managed instead of systemmem.
Found it that adding a Sleep(20) in my render function, right before present, also solved it here.

Probably missing something as check before 'presenting' the BackBuffer.

Any help would be appreciated, it might be quite simple but for now very annoying...

#2cozzie

Posted 23 December 2012 - 08:45 AM

Hi,

I'm trying to show some initialization texts while starting my d3d engine, loadings meshes, shaders etc..
When I run in windowed mode, my drawtext (LP3DXFONT) all works fine and the result is visiblhe through "present" calls.

However when I do the same fullscreen, I get either:
- no texts shown
- and/or D3D debug errors saying assertion failed with bPresentSubmitted
(probably because I'm trying to present something while not ready yet).

It looks like initizing fullscreen (device) takes longer then windowed, causing this to happen.
I tried to add a check for TestCooperativeLevel before 'printing' and presenting the load texts, this didn't help.

What I know is that adding a sleep(100) somehere in the startup, solves the problem. But that's the cheap way I guess.

Do you have experience with this/ and or do you know if there's a d3d function to check if calling dev->present will bring something on screen? (testcooperativelevel seems to give D3D_OK anyway, even when the screen ísn't presenting anything/ able to present)

It by the way also happens when I load my meshes into d3dpool_managed instead of systemmem.
Found it that adding a Sleep(20) in my render function, right before present, also solved it here.

Probably missing something as check before 'presenting' the BackBuffer.

Any help would be appreciated, it might be quite simple but for now very annoying...

#1cozzie

Posted 23 December 2012 - 08:34 AM

Hi,

I'm trying to show some initialization texts while starting my d3d engine, loadings meshes, shaders etc..
When I run in windowed mode, my drawtext (LP3DXFONT) all works fine and the result is visiblhe through "present" calls.

However when I do the same fullscreen, I get either:
- no texts shown
- and/or D3D debug errors saying assertion failed with bPresentSubmitted
(probably because I'm trying to present something while not ready yet).

It looks like initizing fullscreen (device) takes longer then windowed, causing this to happen.
I tried to add a check for TestCooperativeLevel before 'printing' and presenting the load texts, this didn't help.

What I know is that adding a sleep(100) somehere in the startup, solves the problem. But that's the cheap way I guess.

Do you have experience with this/ and or do you know if there's a d3d function to check if calling dev->present will bring something on screen? (testcooperativelevel seems to give D3D_OK anyway, even when the screen ísn't presenting anything/ able to present)

Any help would be appreciated, it might be quite simple but for now very annoying...

PARTNERS