Thread: programming w/direct x

  1. #1
    cereal killer dP munky's Avatar
    Join Date
    Nov 2002
    Posts
    655

    programming w/direct x

    is programming w/direct X like using the win32 api. is it just a collection of libraries and functions? i know there are a million books..."do a search munky"....but i was hoping for a short answer w/o burying myself in it...yet!!!
    guns dont kill people, abortion clinics kill people.

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    Programming in DirectX is a good deal of libraries but there are a good deal of differences including the fact that DX is filled with classes (don't let anybody call DirectX OO, it's a perfect example of the difference between OO and classes)

    Since DX is a COM object all past interfaces are still available, this can make DirectX coding rather confusing... some tutorials teach DirectDraw3 some 5 and some 7. Even the book by Ian Parberry "Learn Game Programming in DX 7" and the updated "... in DX 8" used DirectDraw3 for some reason.

    To me COM makes stuff complicated and increases the posibility of error tenfold, I despise having to code in DirectX but I don't bash it since I recognize that it's more of a style thing, the library itself is powerful.

    --
    edit:
    DirectDraw comes in 3 flavors 3,5, and 7, after 7 MS stopped updating it (yet it is still there and fully functional)

    Direct3D/DirectGraphics is now being updated and can be used for 2D or 3D yet to me using it for 2D felt like using a car to drive a nail because I couldn't find a hammer. [Once again a thing of preference, but if you're going to use 3D to do 2D I'd recommend the lighter OpenGL]
    Last edited by cozman; 02-11-2003 at 10:58 PM.

  3. #3
    cereal killer dP munky's Avatar
    Join Date
    Nov 2002
    Posts
    655
    so i take it it isnt as simple as doing stuff in the win32 api ...
    playsound("blah.wav" | blah | blah)
    guns dont kill people, abortion clinics kill people.

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    There is a lot of setup to do before you can use anything, you have to get the class interfaces and initialize the sound streams and all that stuff.

    Perhaps SDL http://libsdl.org which wraps DirectX (on Windows, X11/fbcon/etc on Linux) would better suit your needs.

    SDL with it's various addons SDL_mixer,SDL_ttf,SDL_image,SDL_net has most of the power of DirectX yet is in a much simpler API.

Popular pages Recent additions subscribe to a feed