Skip to main content
gamedev.net
🔒 Locked

Black screen in debug

Started by Naos00 1 reply 1k views
Original Post
Naos00
Naos00
Hello, A friend and me are currently working on a game. In fact, this game is ended since july 2005, but we are updating some features. So, the first thing we've done was upgrading our SDK to August 2007. Then we met a strange problem : release version works perfectly whereas debug si not at all ! Indeed, in debug mode, we have a black screen : no sprite is displayed ! But text and sounds do (text is drawn with ID3DXFont). We recently realized that few sprites were displayed : thoses on which we apply a zoom or any transformation (=> a call to settransform). So, we add a settransform(matrix identity) before every sprite's drawing. And it definitely works. But it is also not normal ! Why do we have to call this function ? Beside, with identity (so, we do nothing !) ? Is this call slowing down our game ? Is it definitely necessary ? Thank you for your help PS : Our calls to ID3DXSprite::Begin are done with parameter D3DXSPRITE_ALPHABLEND. Should we change this ?
Evil Steve
Evil Steve
Is there any relevant debug output? It sounds like some call is failing. If that happens, you should get debug output telling you what failed and why.

Also, are you checking the return values for all your D3D functions?
Naos00
Naos00
I do not check every D3D-functions call : it would be too long. But you are right : We've professionalizing our code, so we've planed to add this kind of check.

Today is our day : I've found what was wrong ! We are using DGraphics, and billboarding draws on z=0.0f... Idendity is 1.0f ! So, it's now fully working.

Even if I do not understand why it was working in Release !

Thank you

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.