ok to use opengl graphics and directx input/sound ?

Started by
14 comments, last by Nickels 20 years, 6 months ago
Of course, like everybody else, i''ve got this great idea for a program (not quite a game, but could be)! I would like to use Opengl for the graphics and use directx8 or later for the sound and input. is there anything wrong with this? i would like this program to be as widely compatible as possible with good performance.
Climb a mountain, every dawn.
Advertisement
That''s fine, but DX only works on Windows.
-~-The Cow of Darkness-~-
Its fine but if you want to keep portablity you could use FMod for sound, not sure about input. A few openGL libaries has input support but not very good.
APE
YES. I use GL for graphics and DX for input and sound. If you want to make it portable use SDL

[ My Site ]
''I wish life was not so short,'' he thought. ''Languages take such a time, and so do all the things one wants to know about.'' - J.R.R Tolkien
/*ilici*/
That''s actually a very common combination.

Although you are shooting yourself in the foot by using DX8 for sound and input with OpenGL. You should use DX7 for those. DInput and DSound have changed very little.

Basically the problem with an OpenGL/DX8 combo boils down to this: OpenGL is compatible with pretty much everything. Even "ancient" hardware. Whereas DX8 is compatible with only the newer stuff (~GeForce 2 and newer). It doesn''t matter if you''re not doing anything with DX8 for things that you could do with DX7, it''s just the fact you using DX8 that breaks your product.

DSound8 is incompatible with older soundcards. DInput hasn''t changed in a very long time. So it really makes no sense to limit your audience just because 8 is a bigger number.

For my latest project I use an OpenGL/DX7 combo which works on pretty much everything.

So you need to ask yourself "am I using features of DSound and/or DInput 8 that aren''t available in DX7?" If the answer is "no," then use DX7 for sound and input.

Ben


[ IcarusIndie.com | recycledrussianbrides.com | Got Linux? ]


Will Post For Food
I'd suggest—as someone else did—using FMOD for sound. It's tons easier to use than DirectSound. Of course, it's unfair to compare the two because FMOD is a high-level library. But it's great. In fact, it's hands-down the easiest and most pleasant sound library I've ever used.

For input... if you need joystick support, then you might consider SDL, but otherwise, I'd just use the Windows API. For instance, GetCursorPos, SetCursorPos, and GetAsyncKeyState should be enough for most input needs, and perform adequately well.

[edited by - merlin9x9 on October 7, 2003 9:50:21 PM]
FMOD isn''t free for all uses. DirectSound is free for all uses. And getting it to work with Ogg Vorbis is easy. Thereby eliminating all hope of anyone getting a licensing fee out of you. Especially when you use the plug and play class available at the DevZone at IcarusIndie.com for free.

If you want to expand your user base by 3, then using SDL, etc to make it cross platform may be of value. Unless you were intending to make this game project in an effort to learn how to program.

Ben


[ IcarusIndie.com | recycledrussianbrides.com | Got Linux? ]


Will Post For Food
Or you could use OpenAL for sound. It''s got an interface that''s quite similar in syntax to OpenGL, which is nice for consistency. Under Windows, it actually uses DirectSound internally, but it is cross platform compatible. And it gives you hardware 3D audio acceleration, which SDL alone won''t give you.

j
quote:FMOD isn''t free for all uses.

That''s true. If I recall correctly, it''s free for non-commercial use; that''s probably just fine for most of us around here.

DirectSound may be free, but it''s very low level, and—I think—a pain in the neck to use.
quote:DirectSound may be free, but it's very low level, and—I think—a pain in the neck to use.

That's why there's DirectMusic.



[edited by - Polymorphic OOP on October 8, 2003 2:35:49 PM]

This topic is closed to new replies.

Advertisement