Windows7Prof + DX 9 + DX Diag (Issue shattered into three other threads)

Started by
9 comments, last by EnlightenedOne 14 years, 6 months ago
Hi there all, I just upgraded my system too Windows 7 Professional 32bit I did a complete format and switched from Vista and just recompiled my game in the new OS Visual Studio 08 C++ expecting some sort of miracle or disaster sitiuation with an all or nothing problem around compatability. Alas instead I have a rather unusual predicament. My program works ok in none fullscreen mode it flickers on occasion with video playback on my secondary screen but in fullscreen mode I just get a purely black screen, this must be my own issue because of backwards compatability working for everything elese. Is anyone else experiencing similar difficulties out there? or any ideas where I should look to iscolate such an issue? On a secondary note has anyone got any links to really good and thorough tutorials on DX10 if the rumours that the GUI of windows is using it are true be damned if my game is too fall behind before I even get something near a release :p [Edited by - EnlightenedOne on October 24, 2009 3:33:12 PM]
Advertisement
Sounds like a driver issue to be honest. Not sure there is much you can do about it other than wait and hope for a fix.

As for DX10, unless you've already started I wouldn't bother personally. Apart from a more or less complete restructuring of the API it doesn't bring too much new to the table functionality wise. Dig into DX11 I'd say because it has plenty of cool (a.k.a important) features such as multi-threaded devices and compute shaders etc. Plus most DX10 hardware should be able to handle DX11, or at least most of it's features.
Probably a silly question, but have you installed the latest DX9? Vista/Win7 don't come with it, but it will happily sit alongside DX10 in Vista or DX11 in Win7.
To make sure of things im attempting to install every DX software Installer I can get my hands on and im downloading the latest DX SDK. im using the Microsoft DirectX SDK (March 2009) seems to be the latest one so im reinstalling it. If it were a driver issues you think it would hit more than just my own program so im unconvinced thats the issue although im rather impressed it works outright to begin with :p
Intalled it with no change I got the program to run and got it to enter fullscreen mode on the first time the expected display shined up for about half a second before drawing me a lovely black screen. Anyone got any ideas where to start? can't be the windows class failing because I saw for a second that it does get to fullscreen mode. Logic states it must be a DX issue I need to resolve. I will play around and see what I can get. Thanks for the feedback so far!
Ok I did afew tests after changing the refreshed colour of the background to green rather than black for space when I went fullscreen I still just got a big black screen, what would overlay or stop the entire drawing process of my game? without causing some kind of failure, the resolution cant be too small in size or the font drawing mechanism would do what it always does and throw a hissy fit. Therefore something must be overlaying my image when I go fullscreen by my deductions.... the mouse IS drawn over the blank screen.
I have a partial solution/explanation, in Windows 7 if the fullscreen resolution is not the same as the current output for the adapter display rather than clipping the sides of the image and drawing to the middle ignoring the edges or stretching the image the program will show you a blank nothing. To describe the issue in detail if I draw to a native resolution the adapter can manage say drawing a 1024, 768 game resolution onto a 1280,1024 resolution screen, the image does not get stretched to be drawn or clipped mid screen you just get a black screen. The mouse appears to be stretched to the resolution you give covering the entire screen rather than cutting off the edges. On a 1280,800 resolution where your drawing fullscreen at 1024,768 you get a wide (slightly stretched) mouse pointer covering the 1280,1024 area like its being drawn at the 1024,768 resolution over the entire screen. Nothing fails but for some reason the image will very very infrequently blink at you so you can see what you used to get all the time at the image being placed in the middle of the screen and the edges being unused (this is what i mean by clipped). Anyone have any idea whats causing what im dubbing resolution explicit mode?

None standard resolutions work fine for the likes of age of empires and other commercial games of old so why does my games fullscreen seem to act so differently...
I suppose this isnt to crucial an issue if theres a function to identify the current resolution of the screen and change the graphical resolution to that. however it does prevent me from allowing the user to reduce the resolution to manage on lower strength machines.
Just wondering, have you tried using the the Direct-X control panel to switch the run-time into debug mode? Perhaps it might shed some light on the issue...

It's under the 'utilities' folder in the DirectX SDK folder on the start menu.

Give that a go and run your program under Visual Studio in fullscreen. If you are doing something wrong it will spit out errors to the debug output pane.

Worth a shot I think!
I followed your advice and enabled the debug mode Darragh. Wow that was certainly something I upped the ouput to full and got debug running.

I also added #define D3D_DEBUG_INFO to my startup sequence
When I ran the program I had afew redundant render issues because of a multiple particle systems being drawn one after the other being allocated the same texture multiple times aside from that the only trouble I had was the issue below.

Direct3D9: (WARN) :Cannot compute WNear and WFar from the supplied projection matrix

Any clue whats wrong with the matrix below?

_D3DMATRIX
2.4142134 0.00000000 0.00000000 0.00000000
0.00000000 2.4142134 0.00000000 0.00000000
0.00000000 0.00000000 1.0000000 -0.00000000
0.00000000 0.00000000 1.0000000 0.00000000

I got no errors going to the standard resolution fullscreen so I was happy but when I closed down to make the program go fullscreen into a different resolution I got another error.

Direct3D9: (INFO) :MemFini!
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 894
Direct3D9: (ERROR) :Current Process (pid) = 00001304

I had no idea I was leaking memory through DX is there a way of getting further information about the memory issue?

void CloseDirect3D()
{
if (dxfont != NULL)
{
dxfont->Release();
}

if (d3dspt != NULL)
{
d3dspt->Release();
}

if (d3ddev != NULL)
{
d3ddev->Release();
}

if (d3d != NULL)
{
d3d->Release();
}

return;
}

I assumed the release process would clear up DX's stuff, all my dynamic memory is carefully deallocated. I use #define _CRTDBG_MAP_ALLOC to ensure I have no trouble with my code leaking.

Thinking im not overly far from ok I just need to patch the leak and resolve the matrix issue. So I ran the code again to find out what was happening to trouble the fullscreen bug.

The error triggered is "Direct3D9: (ERROR) :Lost due to display uniqueness change" i changed the backbuffer size then run a lost device function I built with no good result. Right before it goes down it shows the change I set.

Direct3D9: :WM_DISPLAYCHANGE: 1024x768x32

I traced the crash step by step as I went into fullscreen mode. All the conditions seemed to be changed fine I get into the reset device conditions and lose my devices from sprites and all then run this

HRESULT hr = d3ddev->Reset(&d3dpp);

This is the line where it dies smack bang on the device reset it works fine in windowed mode but I get this lost due to display unqiueness change issue in fullscreen setup and I have no idea why I am getting it in just windows 7 when it worked fine for Vista because it doesn't on the surface look like an error induced by a windows function. hr doesnt return a failure either DX is just giving me a breakpoint here im clueless as to the source of the issue. Ironically I have gained more insite into DX in this query and changed one issue into 3 issues 2 of which I had no idea were going on. Thanks for any feedback I really hope theres people plugged in enough to explain how to crack these issues or point me in the right direction.

This topic is closed to new replies.

Advertisement