Results 1 to 7 of 7

Thread: Advice re: DirectX and OpenGL on Windows...

  1. #1
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,210

    Default Advice re: DirectX and OpenGL on Windows...

    Hello,

    I'm porting one of my games to Windows. When I compile and run it on a Windows7 machine, it runs just fine; however, if I run it on a Windows8 machine, the entire window is black (happens in windowed and fullscreen). I tried running the same executable (compiled on Windows7) on my Windows8 machine, same result, black screen.

    I am using DirectX9.

    I can debug and step through, and see that the game is actually running on my Windows8 machine.

    Anyone experienced this kind of thing before? Any suggestions as to a solution or plan of attack to resolve the issue?

    ---

    Also, in more general terms, what should I be using for rendering on Windows? DirectX or OpenGL? If DirectX, then which version of DirectX?

    If I plan on doing Windows phone; would that require DirectX11?

    As you may imagine from the fact that I'm using DirectX9, I haven't done anything on Windows for some time; so any advice or info you can offer, would be a great help.

    Thanks.

  2. #2
    Junior Member
    Join Date
    Mar 2005
    Location
    Vancouver, BC
    Posts
    28

    Default

    Hey, did you make any progress on this yet?

    It's a bit odd that it would work on Windows 7 but not Windows 8.

    Thoughts:
    • Install the DirectX SDK on the Windows machine and switch to Debug in the DirectX control panel - check for error/warning messages in the debugger output
    • Check the return value from all DirectX API calls (create a "verify" macro to wrap all calls in, see #define V in DXUT.h)
    • Make sure the video card in the Windows 8 machine actually supports the features you're using - many of the vertex formats are not widely supported


    Regarding OpenGL vs DirectX... it seems to come down to personal preference. OpenGL might be preferable if you're targeting another platform that uses it.

    For DirectX 9 vs 10/11 - unless you really want to support something DX9 can't do, I'd stick with it. As far as I know, there are a lot of Windows XP machines out there still that can't run DX10 or DX11.

  3. #3
    Senior Member
    Join Date
    Nov 2005
    Location
    Brazil
    Posts
    143

    Default

    Have you tried running your game in compatibility mode to see if it runs?

    It could also be a driver issue. Does other direct-x 9 games run fine on those machines?

    Also, a very frequent error is to not check the return value from DX9 calls. Maybe something you try doesn't work, or isn't supported by the hardware in question.
    Check also if textures are power of 2, it never hurts

    As for OpenGL/Direct-X - DX is more compatible on Windows - specially when dealing with low end graphics cards. I know for a fact some intel cards "lie" about features in OpenGL, and you get some really weird results because of that.

  4. #4
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,210

    Default

    Thanks chaps.

    Little more info, I've now compiled the game using the 'Multi-threaded' option, rather than 'Multi-threaded with DLLs'. It's made the .exe a bit bigger. It works on my old Windows XP laptop (after installing the DirectX end-user runtime stuff).

    Still not working on my Windows 8 laptop. Have tested other (presumably) DirectX 9 games, and they work fine on my Win 8 laptop.

    I'm not testing for the hr = S_OK from my DX calls. Not using any esoteric features of DX though. All my textures are power-of-2 (some are non-square power-of-2).

    Install the DirectX SDK on the Windows machine and switch to Debug in the DirectX control panel - check for error/warning messages in the debugger output
    ...sounds interesting.

    Isn't DX now a part of the Windows SDK? I'm sure I installed that on my Win 8 laptop. Any ideas where I find it on my machine?

    Thanks.

  5. #5
    Junior Member
    Join Date
    Mar 2005
    Location
    Vancouver, BC
    Posts
    28

    Default

    Quote Originally Posted by Jamie W View Post
    Isn't DX now a part of the Windows SDK? I'm sure I installed that on my Win 8 laptop. Any ideas where I find it on my machine?
    Ooh, I don't have Windows 8, sounds like it's part of the Windows SDK, in the bin directory: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

    Oh: and try PIX for Windows, that might show something. Hopefully it still works on Windows 8.

  6. #6
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,210

    Default

    Still scratching my head I'm afraid. I've been coding an OpenGL version of my engine instead, which is running fine now, aside from no vsync...

    I think with the DX stuff, my best bet could be to start a fresh project, and build up DX functionality from the ground up, and step-by-step reconstitute my DX game engine.

    One of those things, probably just missed something really basic, with a one line of code type solution.

  7. #7
    Senior Member
    Join Date
    Jul 2006
    Location
    France
    Posts
    1,388

    Default

    Quote Originally Posted by Jamie W View Post
    ...to start a fresh project, and build up DX functionality from the ground up, and step-by-step reconstitute my DX game engine.
    I'haven't look at Win8 yet, but don't they have a basic 2d sample that we can start using as a base?

    JC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •