OpenGL and DirectX questions

Started by
15 comments, last by GameDev.net 19 years, 6 months ago
* Is there a better choice when it comes to simulation software? NOT games. A physics modelling program that needs graphics, for example. Most that I have seen use OpenGL; is there a reason for this? * What is GLUT and GLIDE, etc. and how do they fit in with the OpenGL scene? * If I went with OpenGL, what do I use for audio, and networking, IO, etc.? What are my choices? Assume I want cross platform usage. * When does the next installment of DirectX come out? What does it promise? Should I wait for that before starting a big graphics project? My biggest problem is that I wait for NEW software to come out (that is already widely talked about, but simply not out, yet) and once it comes out, I start slow, and hear of new soon-to-come-out software, and so I wait for that again. I never finish things that way. * On these boards in general, what are people using? Is there preference or is it equally divided? There is a place for everything, I take it. * Do C# and OpenGL make a good pair? For games? For simulation software? Sorry I'm so blunt, I need some answers to play around with in my head for a project I have in mind. I do thank you though for your time, very much!
I am not worthy of a sig! ;)
Advertisement
* The acidemic world seems to favour OpenGL over D3D, however this could simply be down to them running things on non-MS platforms

* GLUT - GL Utitily Toolkit, basicaly a crossplatform windowing and input system.
GLIDE - a Dead 3Dfx API, has nuffin todo with OpenGL

* OpenAL is a crossplatform sound API, there are a a few networking APIs around. Also there is SDL which wraps window creation, input, sound and networking in one set of APIs and is crossplatform.

* There will probably be another DX9 update, maybe next summer, however DX its self I belive is going to stop existing once Longhorn appears, to be replaced with WGF (Windows Graphics Foundation iirc) for the gfx end of thing, I dont know whats going to happen to the rest of the API, probably related to this XNA thing we've seen bundled around.
Surfice to say, D3D as its known will still work in the future, it just wont get any major version increases.
It should be noted, thats what i can gather from various news reports etc, if someone who knows anything better wants to step in feel free [smile]

* On the boards in general there is a reasonable split between D3D, OpenGL and the self made software renderer crowds. D3D questions live in the DirectX forum, OpenGL questions are best directed to the OpenGL forum, the software renderer stuff pretty much lives in here.

* You can use OGL and C#, although i havent personaly so cant comment beyond that.
Hey Jim, if your are going for cross platform programming, I would probably choose OpenGL. As for the other questions, unfortunately, I don't have much experience with OpenGL myself.

As far as C# and OpenGL are concerned, you might want to know that the pro game written in C# just released, Arena Wars, uses OpenGL to render its graphics. If you are interested in using OpenGL from C#, you might check out Tao for a framework (ignore the quality of the page, the site is being rebuilt), or Axiom for an engine.

Sorry I can't aid you more :(. Good luck :D
Jason Olson - Software Developer[ Managed World ]
D3d is overcomplicated while providing better system info than gl. Gl is harder to figure out because of its heavy state nature but it's easier to use because it relies less on os. There is no Com release() or resetting buffers when they're lost and such hard core stuff little relevant to actually outputting gfx or getting your work done :) I've pulled out more hair using d3d than gl. I've used all versions of d3d except 3. Did you know that d3dx7 had easier gfx init. than all versions combined? They mucked it up in later versions. It's like they can't even decide on a uniform way of doing non hw stuff so you end up changing your init code each time new d3d comes out. Very annoying. In this respect gl got it right. I should also mention non existant d3d ihv specs unlike gl. So this means you have to ask your friend for their d3d caps bits. One area that d3d got it right imo, is in the shaders. It's very easy to write shaders in d3d. Heck, ati 8500 card can do 1.1 shaders as well while in gl you have ihv dependant shaders until gffx. The arb fp/vp break that limit and glsl pushes it higher into comfortable territory. The only thing done bad in gl is render to texture and that is about to change as well. Maybe some other features? But I found lack of features in d3d to be annoying, no crossbar? Multitexturing in d3d is hell. The multitexturing flags are spread thru like 3 pages and are bit confusing to figure out, especially those constant factors to the blenders. I'm ranting so I'll stop :) (not to mention in d3d you have to query each feature while in gl you query super set which means less querying).
OpenGL can use double precision floats without a problem ... DX is mainly for games, so accuracy is usually not an issue. For a simulation you will be doing lots of tight looping math operations that will require a fast language such as C/C++ not C#.

Good Luck
-------------Become part of developing the specifications of a new language. Visit CodeBASIC.org
OpenGL might be able to accept double precision floats, but there is no hardware available that I know of that uses double precision for anything.
What the renderer supports is irrelevant in general, if it does support doubles then great, if not, oh well, no loss.. using doubles will yield higher precision that you would loose over multiple calculations using floats. Just like timesteps in physics, the higher the timestep the better the resolution the more precision, the different the timestep and you will have a different output. The D3DX math library uses single precision floats (32 bits) so doing a bunch of calculations in sequence will yield a less accurate simulation model etc.. blah blah blah

If you are goind to hack DX to get around this then you might as well use OpenGL.
-------------Become part of developing the specifications of a new language. Visit CodeBASIC.org
D3D and D3DX have double precision modes for everything, although there's some weird way of requesting it, which I don't remember.


The academic leaning towards OpenGL comes partly from an avoidance of anything that feels "commercial" and mostly because they tend to work on non-Windows systems a lot.


D3D isn't going to change much at this point, until Longhorn. So it's safe to assume that what you see now is what you get.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Assume I want cross platform usage

Well directx isn't an option then
audio & networking? Gl is a graphics library. That is it
As far as preference on the board goes well umm.. gl's pretty popular. Gl sticks to it's base elements - means you get more control but you will have to do more.
I can't say alot about direct3d or directx as I don't use them. But normally my reaction to the name is "ewww"
SDL(http://libsdl.org) is a good option for working crossplatform & interfacing with a number of oses. basically does all the knitty gritty of creating windows & handling events like keyboard/mouse for you & even has simplistic audio support (although I haven't used it)
FMOD (http://fmod.org) & OpenAL (http://openal.org) are the popular choices for sound support
network support: erm standard sockets should be fine in windows & linux
C# : Codemonger mentioned possible speed loss. But I don't believe it would be anything worth worrying about(anybody correct me if they have experience). Ofcourse you can't beat some good fashioned C++ ;]
People ask alot what kinds of things are good for certain kinds of tasks etc. Really the answer is always use whatever you are comfortable with.
If this is your first experience of making something like this I wouldn't jump into it so fast. You'll have to have a playabout firstwith all the stuff to get your own feel for it. You sound kinda rushed & this aint a good sign. Don't expect to get an answer & learn to use the stuff overnight.

Well umm I feel I should end messages on a good note... but I've ran out of words
_______________________________ ________ _____ ___ __ _`By offloading cognitive load to the computer, programmers are able to design more elegant systems' - Unununium OS regarding Python
Quote:Original post by Promit
D3D and D3DX have double precision modes for everything, although there's some weird way of requesting it, which I don't remember.


The academic leaning towards OpenGL comes partly from an avoidance of anything that feels "commercial" and mostly because they tend to work on non-Windows systems a lot.


D3D isn't going to change much at this point, until Longhorn. So it's safe to assume that what you see now is what you get.


From the DX DOCS:

D3DCREATE_FPU_PRESERVE

Indicates that the application needs either double-precision floating-point unit (FPU) or FPU exceptions enabled. Direct3D sets the FPU state each time it is called.

By default, the pipeline uses single precision. Be sure to use this flag to get double precision. Setting the flag will reduce Direct3D performance.

-------------------------

Although I've never heard of D3DX having support for doubles ... do they ?
-------------Become part of developing the specifications of a new language. Visit CodeBASIC.org

This topic is closed to new replies.

Advertisement