Tag Info

Hot answers tagged

1158

Many of the answers here are really, really good. But the OpenGL and Direct3D (D3D) issue should probably be addressed. And that requires... a history lesson. And before we begin, I know far more about OpenGL than I do about Direct3D. I've never written a line of D3D code in my life, and I've written tutorials on OpenGL. So what I'm about to say isn't a ...


133

I found it strange that everybody's focusing on user base, when the question is 'game developers', not 'game editors'. For me, as a developer, Linux is a bloody mess. There are so many versions, desktop managers, UI kits, etc... If I don't want to distribute my work as open source, where the user can (try to) recompile so it fits his unique combination of ...


88

It's because there are more Windows users on the planet than Linux and Mac. The truth is that people make things for whichever has the biggest market. The same goes with mobile phones: Android and iPhone have awesome games but Windows Mobile and Symbian don't...


70

I guess people often claim that C is faster than C++ because it's easier to reason about performance in C. C++ is not inherently slower or faster, but certain C++ code might obscure hidden performance penalties. For example, there can be copies and implicit conversions which are not immediately visible when looking at some piece of C++ code. Let's take the ...


50

Because Windows has over 90% market share, and Linux (since you specifically asked about Linux) has a reputation for having lots of users who don't like to pay for software. Whether or not that's true or how true it is is irrelevant; the perception is there and it influences people's decisions.


49

I know this is an old post, but I saw this post being referenced and dislike the chosen answer's tone. So I did a bit of investigation! DirectX is old. It was first released in 1995, when the world had much more than Nvidia and ATI, DirectX vs OpenGL. That's over 15 years, people. 3dfx Interactive's Glide (one of DirectX's competitors back in the day. ...


30

Code written in C++ can be faster than in C, for certain types of tasks. If you prefer C++, use C++. Any performance issues are going to be insignificant compared to algorithmic decisions of your software.


25

Both OpenGL and SDL are C libraries and expose a C interface to the rest of the world (as pretty much every language out there can interface with C but not necessarily with C++). Thus, they're restricted to the procedural interface that C gives you and the C way of declaring and using data structures. Over and above the "interfacing with other languages" ...


22

I'm surprised nobody mentioned something: OpenGL works in a left-handed coordinate system too. At least, it does when you're working with shaders and use the default depth range. Once you throw out the fixed-function pipeline, you deal directly with "clip-space". The OpenGL Specification defines clip-space as a 4D homogeneous coordinate system. When you ...


22

One of the design principles of C++ is that you don't pay for features you don't use. So, if you write code in C++ and avoid features that don't exist in C, then the resulting compiled code should be equivalent in performance (though you would have to measure this). There is negligible cost to using classes, for example, compared to structs and a bunch of ...


13

There is no such thing as a fast track to C++. C++ is one of the most complicated languages to master properly. And also OpenGL and computational geometry is a vast field, time consuming to learn. OpenGL is some graphics API. But saying it was the best API for graphics is like saying a workshop full of tools and all the raw materials are the best for ...


12

One reason that higher level languages are sometimes slower is that they can hide behind the scenes a lot more memory management than lower level languages. Any language (or library, API, etc) that abstracts away low level detail can potentially be hiding costly operations. For example, in some languages simply trimming trailing whitespace from a string ...


11

Because Windows is backed by a huge organization, that more than a decade ago decided they want game development to happen on their platform. This wasn't true for the Mac, and it isn't true now. Not even for iOS. Apple doesn't provide tools for iOS game development. But it's a huge market (there's more iPhones out there, than there was PCs in 1995) with ...


11

This answer comes a bit too late, but I hope to shine light to others (particularly now that C++ standard committee wants to incorporate Cairo into std): The reason nobody really cares about "accelerated vector graphics" is because of how GPUs work. GPUs work using massive parallelization and SIMD capabilities to colour each pixel. AMD typically works in ...


10

They are both essentially equivalent, as one can be easily transformed into the other. The only advantage I can find for the left-handed system is: as objects are farther away from the observer, in any direction (x, y, or z), the distance is a higher value. But I have no idea if this is why Microsoft chose one over the other. POV-Ray also uses a ...


10

It's pure history. In ancient days the early cave-graphics programmers thought of the monitor (teletype? stonetype?) viewing surface as two dimensional graph paper. In math and engineering the usual conventions for plotting data points on graph paper is: x=right, y=up. Then one day, about a week after the invention of the silicon wheel, someone thought ...


10

As some have already said, the most important part is the user-base. 95% of PC users use Windows. PC gamers use almost exclusively Windows. Even these who use Mac or Linux most often run Windows games through some virtualization or emulation (with very, very few exceptions). But demographic is not everything. I wouldn't underestimate the part that Microsoft ...


7

Before I begin, in the interest of full disclosure, I have my own set of intro OpenGL tutorials. So feel free to take my assessment in that regard. First, ICG 5th edition has been supplanted with ICG 6th edition, which teaches from shaders. You should look into that, as shaders are important. However, looking at the blurb on Amazon, it seems to stop with ...


7

This topic triggers an old debate of CPU vs GPU, and there are tons of documents and papers out there explaining the differences between these processors. But just to summarize a few things, remember that each processor was made for a specific task. GPUs dedicates more transistors to data processing, and from the memory usage point of view, CPU is optimized ...


7

Except OpenGL, I never used those libraries, but I'm going to try to guess, by reading wikipedia pages, like you did. You seem right about Mesa. Here is the additional info we have : "The X window system is a computer software system and network protocol that provides a basis GUIs for networked computers. It creates a hardware abstraction layer." "GLX ...


7

I think you are confusing "writing a library" vs. "exposing API to outside". I don't know much specifically about the libraries you've mentioned (they might be internally written in C), but I know many others, myself included, have written C++ libraries/frameworks which fully utilized all kinds of fancy OOP practices/patterns, but still exposed C-style API ...


6

Ewwww, I don't. I use Linux almost exclusively. I dual-boot to Windows to make Windows builds, and use the Mac for the Mac builds, but that's it. The trick is a cross-platform framework we've developed over the years. Our games are built on top of that, and behave identically in Linux/OpenGL, Mac/OpenGL, and Windows/Direct3D (and soon in iOS/OpenGL). ...


6

I'd like to see a library which is elegant and simple to use with Haskell. The rest is technical details that should serve this purpose, not redefine it. Thus my $0.02. Don't base it on an existing toolkit, like Qt or GTK or FLTK or... — this will severely limit you and will probably give you far more pain than profit. PyQt is, erm, funny and contrived ...


6

Both OpenGL and SDL are C libraries, not C++ libraries. You can use them from C++, but they're written in C and have a C API (which is also accessible from other languages; C++ is a pain to access via a FFI). Have a look at Boost for a large array of general-purpose (and some specialized) C++ libraries and SFML for a C++ multimedia library.


5

The thing to understand is that a HUGE amount of programmer time has been wasted converting between left-handed and right-handed coordinate systems, and even more programmer time has been wasted remembering which system was needed at any particular instant. All of that went away when right-handed coordinate systems became the industry standard. There are ...


5

OpenCL is a language/API for doing general purpose highly parallel calculations on a graphics card, but can also be used to generate computed images which are displayed by openGL or directX It's an open standard (like openGL), CUDA is the NVIDIA only competitor. Why? Because your $100 graphics card can do 1000s of tasks in parallel - turning it in a ...


4

The lead developer of DirectX (and Direct3D) Alex St. John recently commented on that. In an article on the history of Direct3D he wrote: I [...] was asked to choose a handedness for the Direct3D API. I chose a left handed coordinate system, in part out of personal preference. [...] it was an arbitrary choice. Source: ...


4

To all those who think there is no advantage to right- or left-handedness, you are absolutely wrong. The right-handedness of Cartesian co-ordinate systems comes from the definition of the vector cross product. For XYZ basis vectors u, v and w, w = u X v. This definition is fundamental to vector mathematics, vector calculus and much of physics. Suppose ...


4

Inertia. If you've used Windows in the past then switching to something else is a hassle. If you're on Windows DirectX is easier and more likely to work well than OpenGL. Market share. The market share of Windows on the desktop is bigger than that of OS X which in turn is bigger than that of Linux. Money talks. Brand. DirectX is better known than things ...


4

Tools, tools, tools. That's what it comes down to. Develop on Windows and you get access to some of the best development tools on the planet. Nothing comes even remotely close to Visual Studio's debugger, the DirectX Debug Runtimes are awesome, PIX is awesome, and comparable equivalents just don't exist on other platforms/APIs. Sure, there is some good ...



Only top voted, non community-wiki answers of a minimum length are eligible