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)?
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)?
well, you can use OpenGL for graphics and DX for sound/ input. However there are other libraries available.
input -> GLUT / win32 API
sound -> FMOD
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)Originally posted by Perspective
well, you can use OpenGL for graphics and DX for sound/ input.
Away.
>> 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, 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?).
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...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.
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.
Uhm.... 'tis maybe a bit off topic, but what is DirectPlay ?
DirectPlay is the DirectX component that provides networking for your DX game/app.
Ouch! I would never allow DirectX to mess with my sockets =)Originally posted by unanimous
DirectPlay is the DirectX component that provides networking for your DX game/app.
Thanks for the reply!
They fixed the security issues, I believe. I saw it in the windows updatesOriginally posted by darksaidin
Ouch! I would never allow DirectX to mess with my sockets =)
Thanks for the reply!
Away.
Hmm, so i suppose the most popular alternatives are:
Direct Audio - FMod
Direct Input - Glut ?!
Direct Play - ???
In place of DirectPlay, you could always try something like ENet: http://enet.cubik.org/
>> 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
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.)
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.