• Advertisement
Sign in to follow this  

DirectX9 Blank Screen problem

This topic is 2978 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I went to school and open visual C++ 2008 express edition. DirectX SDK is already installed there and directories are correctly pointed. When making a window from scratch(just like in http://www.directxtutorial.com) it runs smoothly. But when I added the codes of having directx enabled window. it crashes. using breakpoints, i found out that d3ddev is NULL. i don't know why. when i tried the same codes in my laptop, it works. as well as others PC. actually, inside my school's Lab, there are 13 PCs, 2 of those PCs works. I mean this dx blank window worked on those 2 Pc's but on the rest, it crashes. What could be the problem.. please.. i need it as soon as possible because we need to make it work before Sunday this week. Thanks a lot..

Share this post


Link to post
Share on other sites
Advertisement
here's the code of giving d3ddev a value.

Quote:


d3d->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
App.hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp,
&d3ddev);



But for those 13 Pc's the d3ddev is still NULL after this line. It should have a value.

Share this post


Link to post
Share on other sites
Quote:
just like in http://www.directxtutorial.com

Don't use that site! Arguments against directxtutorial.com here. (Especially see Evil Steve's posts)

If you want good DirectX tutorials, check out Evil Steve's tutorials here.

As for your question, you might be trying to create a device that your computer's hardware can't support. There could be several reasons why d3ddev is NULL. Make sure you check the HRESULT return value from the Direct3D functions.

Share this post


Link to post
Share on other sites
how will i know the error of hresult?

HRESULT hr = d3d->CreateDevice();

I put a breakpoint after that. and hr has a value of long negative numbers.
how will i know the reason of that issue?

I tried to use both hardware and software vertex processing but didn't solve the issue.

Share this post


Link to post
Share on other sites
You could try googling the error code.

Evil Steve's tutorials show how to properly check error codes, and includes a way to get meaningful information from those HRESULT codes.

Share this post


Link to post
Share on other sites
First, make sure you're using the debug runtimes. That'll tell you if you're making a mistake in your code.

Second, you must check the return value for all functions that you care about failing (I.e. all functions that return a pointer, fill in a struct you rely on, etc). To do that, you use the SUCCEEDED or FAILED macro to tell you if the return value is a success or failure code (D3D_OK is not the only success code, there's over 2 billion others), and if you want to display the error code in an error log or message window, use DXGetErrorString to convert it into a human readable error message, or DXGetErrorDescription to give a more detailed error (Although that's usually not worth displaying to the user).

Share this post


Link to post
Share on other sites
waaa.. please help.. the return of DXGetErrorString and DXGetErrorDescription is "Not Available" I went to the Lab, the HRESULT value is -2005530518

What is that error? please help me find a way to fix this. I already tried to use the mode.Format but it also gives D3DFMT_X8R8G8B8. so no changes. please help..thanks..

Share this post


Link to post
Share on other sites
Quote:
Original post by macmoy
waaa.. please help.. the return of DXGetErrorString and DXGetErrorDescription is "Not Available" I went to the Lab, the HRESULT value is -2005530518

What is that error? please help me find a way to fix this. I already tried to use the mode.Format but it also gives D3DFMT_X8R8G8B8. so no changes. please help..thanks..
That is the error. That error code is D3DERR_NOTAVAILABLE. The debug runtimes (linked above) will tell you why you're getting that error.

Share this post


Link to post
Share on other sites
huh?? so where can i find the info? is this the info?
Quote:

Direct3D9: :====> ENTER: DLLMAIN(00e6e6e0): Process Attach: 00000f54, tid=00000944
Direct3D9: :====> EXIT: DLLMAIN(00e6e6e0): Process Attach: 00000f54
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
Direct3D9: (INFO) :======================= Hal HWVP device selected

Direct3D9: (INFO) :HalDevice Driver style 9

Direct3D9: :BackBufferCount not specified, considered default 1
Direct3D9: :DoneExclusiveMode


how will i solve this?

Why is that there are 2 computers that can run the application while there are 13 which can't?

Share this post


Link to post
Share on other sites
go to start
dx skd
dx utilities

dx error look up

i always confused by this minus something numbers
but i thin the error means


HRESULT: 0x8876086a (2289436778)
Name: D3DERR_NOTAVAILABLE
Description: Not available
Severity code: Failed
Facility Code: FACILITY_D3D (2166)
Error Code: 0x086a (2154)


so i am realative sure that the hardware of the 13 comps isnt suficient enough to run DX9

in the utils directori there is also a DX CAPS viewer check whit it if the hardware is capable of DX9



Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement