Thread: [DirectX] I cant figure out this error...

  1. #16
    Registered User
    Join Date
    Nov 2005
    I tried using the DXTrace function, but all it says even if i make an error occur is unknown error. It doesn't show the file or line number like the docs say it should.
    I am linking against DxErr9.lib ( i tried dxErr.lib also ).
    This is how i am using it. Am I doing this wrong?
    HRESULT RetVal = sData->d3D->CreateDevice(D3DADAPTER_DEFAULT,
    	if ( RetVal != D3D_OK )

  2. #17
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Are you using getdevcaps to make sure your device can handle the settings you are putting into d3dpp? Try printing otu teh actual hexadecimal code that is returned in RetVal.

  3. #18
    Registered User
    Join Date
    Nov 2005
    That code will not work on this computer. I purposely made it so. I am trying to figure out why
    is not working.

    I have attached a image of the screen when the message box is showing. It has absolutely no information in it.

    I can do
    and the debug message shows the information in the debugger window, but I want to have message box errors.


    the doc states that you can set D3DFMT_UNKNOWN in windowed mode, but do not have to.
    Quote Originally Posted by Documentation
    The back buffer format. For more information about formats, see D3DFORMAT. This value must be one of the render-target formats as validated by IDirect3D9::CheckDeviceType. You can use IDirect3DDevice9::GetDisplayMode to obtain the current format.
    In fact, D3DFMT_UNKNOWN can be specified for the BackBufferFormat while in windowed mode. This tells the runtime to use the current display-mode format and eliminates the need to call IDirect3DDevice9::GetDisplayMode.

    For windowed applications, the back buffer format no longer needs to match the display-mode format because color conversion can now be done by the hardware (if the hardware supports color conversion). The set of possible back buffer formats is constrained, but the runtime will allow any valid back buffer format to be presented to any desktop format. (There is the additional requirement that the device be operable in the desktop mode; devices typically do not operate in 8 bits per pixel modes.)

    Full-screen applications cannot do color conversion.
    Last edited by Raigne; 09-05-2008 at 01:47 AM.

  4. #19
    Join Date
    Oct 2007
    Inside my computer
    You can use alt+print screen to take a snapshot only of the dialog, you know...
    You can also try DXGetErrorString9 or whatever it's called. It gets the error description from an error code.
    Then just print it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Registered User
    Join Date
    Nov 2005
    I understand that, but kind of odd that the DX function does not work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM