Opengl users: What are your replacements for DirectX Components?

This is a discussion on Opengl users: What are your replacements for DirectX Components? within the Game Programming forums, part of the General Programming Boards category; Heh, I know Opengl is for pure graphics, whereas DirectX includes the following components: DirectGraphics Direct Audio Direct Input Direct ...

  1. #1
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020

    Opengl users: What are your replacements for DirectX Components?

    Heh,

    I know Opengl is for pure graphics, whereas DirectX includes the following components:
    DirectGraphics
    Direct Audio
    Direct Input
    Direct Play

    My question is, what do you use for all the other stuff (e.g. sound, input)?

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    well, you can use OpenGL for graphics and DX for sound/ input. However there are other libraries available.

    input -> GLUT / win32 API
    sound -> FMOD

  3. #3
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Originally posted by Perspective
    well, you can use OpenGL for graphics and DX for sound/ input.
    Which, IMO, would be incredibly silly. It's not like you're going to have portable code if you do that, which is the reason a lot of people like OpenGL (yeah, I know a lot of people also think it's easier)
    Away.

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    >> which is the reason a lot of people like OpenGL (yeah, I know a lot of people also think it's easier)


    its not just that a lot of people think its easier, a lot of people think its just a better API. Im not trying to turn this into an OpenGL vs DX thread, but i find the DX structure (from what ive seen anyway) to be horrible. I cant stand having 15 pointless capital letters at the begging of every function and class. But thats just my preference, i dont like the MS programming conventions in general.

  5. #5
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    well, for audio, you can program up your own waveform audio functions, if you so want to. Or, you can use MCI commands for the audio, or any slew of other sound types. for input, i usually use GetKeyState(); mainly cause it is faster than the message loop alternative.

    I have to give direct x one thing, the DirectInput is incredibly useful for the programmer and end user. Being to switch input devices in game without restarting the game is a big +plus in my opinion.

    However, here is a major question, are you looking for portability in code? Direct X is pretty fine in my opinion, as why look for portability when one OS has 90% of the market for games, and the other 10% is split among people who no matter what, its alot of port code, and the group that wont pay a cent for anything cause they think that because the OS is opensource, the programs should all be also.

    EDIT: the above only holds for games, the workstation market is mostly linux/unix based, so if your making a 3d modeller or rendering system for high end detail, Opengl is the best bet, or IrixGL(sp?).

  6. #6
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Originally posted by Perspective
    >> which is the reason a lot of people like OpenGL (yeah, I know a lot of people also think it's easier)


    its not just that a lot of people think its easier, a lot of people think its just a better API. Im not trying to turn this into an OpenGL vs DX thread, but i find the DX structure (from what ive seen anyway) to be horrible. I cant stand having 15 pointless capital letters at the begging of every function and class. But thats just my preference, i dont like the MS programming conventions in general.
    Well, from what I've read, the original versions of DirectX were horrible, and then they slowly got better. Then there were some fairly major overhals. Anyway, it seems that the API is pretty clean now (I'm using DX9). The variable/function names are a bit hard to remember at first, but once you get into it and start typing them, it's not too bad. Just a bit of hungarian notation...

    oh, and DirectInput is great imo. It is soooo much smoother than using the WinAPI for input with DirectX.

    There's my two cents...
    Away.

  7. #7
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314
    Uhm.... 'tis maybe a bit off topic, but what is DirectPlay ?

  8. #8
    Perverted unanimous's Avatar
    Join Date
    Oct 2001
    Posts
    336
    DirectPlay is the DirectX component that provides networking for your DX game/app.
    Give me a bad reputation!!!

  9. #9
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314
    Originally posted by unanimous
    DirectPlay is the DirectX component that provides networking for your DX game/app.
    Ouch! I would never allow DirectX to mess with my sockets =)

    Thanks for the reply!

  10. #10
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Originally posted by darksaidin
    Ouch! I would never allow DirectX to mess with my sockets =)

    Thanks for the reply!
    They fixed the security issues, I believe. I saw it in the windows updates
    Away.

  11. #11
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Hmm, so i suppose the most popular alternatives are:

    Direct Audio - FMod
    Direct Input - Glut ?!
    Direct Play - ???

  12. #12
    Perverted unanimous's Avatar
    Join Date
    Oct 2001
    Posts
    336
    In place of DirectPlay, you could always try something like ENet: http://enet.cubik.org/
    Give me a bad reputation!!!

  13. #13
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    >> Direct Play - ???
    Beej's guide.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  14. #14
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    I've got a dx8/9 (depends on defines set so I can develop for dx8/9 releases) input class that plugs in quite nicely to all my code. IE

    // in an important header file global.h
    CDInputController Input;

    // first time initiation code
    Input.init();


    // game loop
    Input.pollMouse();
    Input.controlls();


    Of course controlls is a virtual function that I redefine appropriately for each application. I find it a simple and robust enough to work for what ever i need.

    For sound I have another robust self coded class using FMOD. load(), play(), pause(), stop(), and few other useful stuff.

    Thats my method.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  15. #15
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314
    On my computer, DirectInput from a mouse seems to be very choppy. I haven't tried it in my own code, but Quake3 uses DirectInput and the mouseinput is not as smooth as in good old DOS games (like Quake 1). In my small 3D-engine I use API calls and it appears to be pretty smooth.

    This might of course be just a problem with my setup/mouse etc.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function validation.
    By Fhl in forum C Programming
    Replies: 10
    Last Post: 02-22-2006, 07:18 AM
  2. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 06:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21