Thread: Debugging in full-screen Direct-X mode

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Debugging in full-screen Direct-X mode

    I am currently writing a 3D games engine using Direct Draw with Visual C++. So far I've created line vector objects but would like to sproose it up by introducing flat polygon filling & z-buffering.

    However, I need to use the debugger but because the application runs in full-screen, page-flipping mode, it completely takes over!!!

    Is there a trick of the trade here??

    How can I use the debugger while running the application?????

    Cheers, Adam

  2. #2
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    2 monitors are used, one for the Graphics output the other for the debugging.

    How it's done, I don't know. I've never tried it before. Visit microsoft's site and check their DX 8.1 documentation, the DirectX Graphics ( D3D8.1 ) section has things about debugging in full-screen. I don't know if it's general ( i.e. applicable to DirectDraw ) but you might find it useful.

    By the way, why don't you use DirectX Graphics?
    Muhammad Haggag

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Cool

    Ahhhh, so that's how you do it!! I only have one monitor output on my comp, so poerhaps I'll need to upgrade to a G-force card with double output???

    Cheers, that's really helpful - Microsofts DX page is my next port of call!

    PS- I've not heard of DGraphics (oops!) and am only aware of DDraw and D3D in this department. Is DGraphics better?

  4. #4
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    PS- I've not heard of DGraphics (oops!) and am only aware of DDraw and D3D in this department. Is DGraphics better?
    Direct3D 8/8.1 is named DirectX Graphics to reflect the fact that it's a completely new design ( much better, actually ) that's used, along with the elimination of DirectDraw ( there's no DirectDraw 8/8.1, 7 is the latest & last version. There's going to be no more DDraw )

    DirectX Graphics allows the programmer - in my opinion - to code amazing 2D & 3D graphics, and the 2D is much easier than DirectDraw.
    Muhammad Haggag

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Thumbs up

    I see - yeah, I think it's v7 that I'm using. I know that I could make my life at lot easier by using D3D (or the 3D side of DGraphics) but I kinda wanted the challenge of building a 3D engine with only a line drawing function at hand - mad, I know!!

    Cheers for the help & now have alot of research ahead of me (ahhhhhhhhh)

  6. #6
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Ok so here's the deal with debugging full-screen apps. If you are running Windows2K you can do it. (maybe with others but i'm not sure) Just use your primary video card and then buy a little cheap PCI second one. It's pretty easy to setup and you can make the PCI one secondary and re-direct output to that monitor. Also, I believe DX8 comes with a "trace" tool that you can output to a windowed program. I think you can output message like
    Trace( "Function Called, i = %d ", num1 ); Similar to Printf. And you can also trace error messages easily.

  7. #7
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    I kinda wanted the challenge of building a 3D engine with only a line drawing function at hand - mad, I know!!
    It's great to do so. I believe most 3D programmers have tried it some time, I tried implementing a 3D engine using DirectDraw when I first started 3D programming. Although I didn't finish it ( I implemented all, until it came to Z-Buffering, and then the DX8 SDK was released, and I couldn't help but switching to DirectX Graphics. The gouraud shader had some problems, though and the Z-Buffering made the thing VERY slow [ Later, I read Paul "Midnight" Nettle's S-Buffer FAQ. This would've imporoved performance a lot] )

    Doing rasterization yourself it excellent, it gives you an idea about what DirectX Graphics ( or more precisely, the display adapter ) does for you. Just don't keep on doing that forever, experiment with software rendering a little, then switch to either DX or OGL.

    By the way, there's something I forgot to tell you. When debugging 3D apps ( games ), you don't need to debug in full-screen. Most engines have the ability to run in windowed mode, in which you can happily debug everything.
    This is the way most people do it, since few people have 2 monitors.
    Muhammad Haggag

  8. #8
    ‡ †hë Ö†hÈr sîÐè ‡ Nor's Avatar
    Join Date
    Nov 2001
    Posts
    299
    I use a GeForce 4 card with TV out. And when I run and DirectX games I have to disable the secondary monitor or I crash.
    Is there any fixes??
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  2. Detecting Full Screen Mode
    By ldd7812 in forum Windows Programming
    Replies: 2
    Last Post: 05-29-2008, 10:36 PM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  4. Full Screen
    By magic in forum C Programming
    Replies: 1
    Last Post: 11-08-2001, 02:58 AM
  5. Debugging mode selection during compile time
    By YALINI in forum C Programming
    Replies: 1
    Last Post: 09-03-2001, 09:56 AM