If OpenGL is supposed to be just as good if not even better than Direct3D (Not talking about DirectX here), then why don't developers use OpenGL to program their games generating some extra sales on GNU/Linux and Macintosh?
They're game developers, what'd you expect? They just use whatever MS bribed their school to teach them.
Name:
Anonymous2010-02-21 18:16
DirectX works for what it does. OpenGL only handles 3D graphics. This means that the programmer needs to find other libraries to handle what DirectX does.
Name:
Anonymous2010-02-21 18:17
Writing code for multiple platforms goes FAR beyond the choice of graphics API.
Because Microsoft is made of greedy, monopolizing fucks.
1. Microsoft pays graphics card designers to purposely gimp their OpenGL performance. When you buy a "workstation" card, you're getting almost the exact same thing as the equivalent "consumer level" card, but with a slightly different firmware.
2. Microsoft pays game development companies to spend more work on the D3D renderers than on the OpenGL renderers
On top of that, D3D is a horrible mess of a library. Its only saving grace from a design standpoint is that it's tightly integrated with other game-related libraries (DirectSound, etc) so that developers don't have to spend forever trying to figure out which libraries to use along with their OpenGL instance/whatever.
Similar to what has already been mentioned: OpenGL and DirectX technologies may be similar (or perhaps OpenGL better), but DirectX comes with a full suite of tools, libraries, and development pipeline. It tries to be a full solution from start to end, while OpenGL is just the rendering part.
>>1 (Not talking about DirectX here),
Oh, how wrong you are. DirectX has almost everything to do with it. It's a package deal. It's not a fantastic one, but it covers all the bases. OpenGL does not.
A more interesting question is why did Microsoft not use OpenGL for their Direct3D component? The answer is that they decided that OGL was inefficient, built D3D and OGL implementations, screwed up the OGL one and (erroneously) Q.E.D.'d D3D to be the winner.
At that time D3D was especially bad technologically, and some dude came along and proved them wrong about OGL's efficiency. The problem then being that they'd already built their DX monolith (at least in definition) by then, and it stuck. (Not like they would have listened anyway.)
BTW, PS3 game developers [biou]do[/biou] use OGL. The upshot is that XBox "exclusives" almost always get PC ports at some point, and PS3 exclusives never end up on a Linux PC because you can't sell anything that isn't drenched in patchouli oil to hippies.
Name:
Anonymous2010-02-22 17:39
>>20 patchouli
Smelling patchouli is like trolling my nose.
Name:
Anonymous2010-02-22 17:41
>>21
I do like the smell of it, but I can never get them hippies to buy my video games.
Name:
Anonymous2010-02-22 18:38
You wanna know why? OpenGL sucks. There was a time when OpenGL was good; most actually preferred to write using OpenGL than Direct3D. Then Microsoft said "No.", and ever since then Direct3D has been infinitely better than OpenGL.
Name:
Anonymous2010-02-22 18:45
>>23
You'll have to be a bit more specific with that story because I lost the narrative causality at the point where you said "Microsoft said 'No'."
What is it that D3D can do that OGL can't?
If I were a game developer(I'm not), I'd rather write the 3D subsystem in OpenGL than in Direct3D, for portability reasons(*nix, consoles,...) and that it's less bloated than D3D. And this is coming from someone who actually likes Microsoft's APIs (Win32 and friends).
>>28
Does the 360 not support OpenGL at all? >>27
Should have expected this response. I know it's the usual response to such things and I should not bother responding to trolls, but the whole thing about many parameters being NULL is just an inadequency of C's parameter list design. Unlike more high-level languages, C doesn't have support for comfortable support for: optional arguments, keyword arguments or variable number of arguments. (okay, you could use varargs to get support for such things, but it'd be more work for little gain, since C doesn't have a powerful enough macro system). So you pass NULL for arguments that you don't care about, instead of having some keyword arguments which your compiler could translate into appropriate calls. That said, NULL args are more efficient than direct keyword args as the arglist parsing is done by the programmer(human compiler), however it would be possible to do such transformations to keep the efficiency using a real macro(in a powerful enough language) or a compiler.
Example:
fun1 has 6 arguments: a,b,c,d,e,f
You only care to pass 2 values, c and f: fun1(NULL,NULL,1,NULL,NULL,NULL,2);
In another language which supports keyword args: (fun1 :c 1 :f 2) ;Much clear isn't it?
Now the compiler has 2 options, either pass '(:c 1 :f 2) as a list, and do the arglist parsing/destructuring in fun1 (slower, how it's usually done as someone might want to pass unknown arguments), or the arglist parsing can be done using a compiler macro which transforms it into a call like (fun1 nil nil 1 nil nil nil 2). C doesn't have easy support for such code transformations, and MS chose it to implement their OS (and C++ for less important client applications). [m]NULL, NULL, NULL[mm] are the cost of their compromise. It could be easily solved, but it won't be as long as they stay with vanilla C. (Reducing the feature-count is a non-solution for true ``ENTERPRISE'' flexible applications, so don't even mention it.)
>>29
No function should use so many parameters at the same time, even if it did it would use separate params at separate times within its block. So a well-designed API would define more functions that use less parameters, such that a programmer could call two or three functions instead of wasting readability on one with a dozen NULLs.
It would of course have to assume they are being called in the correct order (or at least check for that). Which is harder to spot - calling init_that_thing before init_this_thing, or putting NULL, NULL, NULL, NULL, 6, NULL, NULL, NULL instead of NULL, NULL, NULL, 6, NULL, NULL, NULL, NULL?
Name:
Anonymous2010-02-23 7:06
>>35
Which is worse, knowing everything you need to know up front, or having a mandatory dependency in a completely different place?
I can either go to line n and know all the clues I'll need to solve the problem, or I can hope that the documentation was good enough to explain the expected order of operations that I would have otherwise had to guess.
But seriously, I'm not advocating for either way. I'm sure there are instances where more functions would have worked better than more arguments in the Windows API (but then you run into the ProcExEx problem...). Eventually a programmer is going to have to put up with some complexity when working with a complex system. Especially in such a straightforward language as C.
>>35
Most people use some sort of IDE that looks up the function prototype and highlights the current function/argument, so getting the order wrong is rarely an issue. Sometimes I write ANSI C in simple editors and do get argument order wrong, even in functions with small argcounts (3+, for example, I don't remember how many times I looked up fseek/fread's definition).
As for redesigning the function APIs, I think it would be rather tricky to do given Win32 APIs features and complexity.
Most people use some sort of IDE that looks up the function prototype and highlights the current function/argument, so getting the order wrong is rarely an issue.
It is problematic to require an external tool just to compensate for the problems of a language or library design. Most people recognize this, and just hold their nose when they have to use the language and/or tools. But not you!
Name:
Anonymous2010-02-23 10:00
>>38
Computers exist to solve information problems for the users. If you're not writing code in paper, I don't see why you shouldn't make use of a computer for a job that its designed to perform.
Name:
Anonymous2010-02-23 10:33
>>37
That APIs add no value and are good only to make you an mstarded faggot who cannot use standardized interfaces to do shit and secure your otherwise worthless existance. And if you don't get it then go die now.
>>38
I can write code from memory or looking up documentation, however I've used tools such as Emacs (for writing Common Lisp code) and Microsoft Visual Studio (for writing C, C++ and C# code) to increase my efficiency by quite a bit. I found that having the editor display the arglist of the current function, and possibly highlight the current argument to be a very useful feature, along with symbol completion/lookup features. They reduce typing by a lot, and save you time. Tools exist to be used. Doing everything in a simpler editor is only for times when you have nothing better to use. It is problematic to require an external tool just to compensate for the problems of a language or library design.
How is it a library problem? If a library is large, or the user is not entirely familiar with the order of arguments of a function, it's only normal you'd look it up in the documentation, but why do that when you can have your editor tell you exactly what you want to know without having to waste time looking it up? Not using tools to increase your efficiency is just an useless macho attitude to programming and it does not help anyone become a better programmer, the only thing it helps you with is having you memorize information which is of little importance (such as argument order - however, one usually remembers such things if one uses a function one too many times).
>>40
You do know that some of those options didn't exist in early Windows versions, they exist because people NEEDED them. For example, from those functions I needed VirtualAllocEx in Windows 9x, and you know what? It didn't have such an API, people had to write some kernel hacks to get what they want.
Name:
Anonymous2010-02-23 11:04
>>42
You should have better fixed your broken program to not require such braindamaged functions. Of course Windos sucked harder than Winnt but that's not because Bill added some cruft to sell more MCSE certificates...
Name:
Anonymous2010-02-23 11:08
>>41 Not using tools to increase your efficiency is just an useless macho attitude to programming and it does not help anyone become a better programmer
i disagree, it is helpfull for beginners to do things manualy.
>>44
Obviously someone has to read the documentation the first time they want to use the function, however looking up arglists for functions whose purpose and meaning you know is somewhat pointless.
>>43
It's pretty clear you're trolling, but those 3 functions have very basic functions:
CreateFile - open or create a file, fopen would be the ANSI C equivalent, however as you might guess, this allows fine-tuning of a lot more things than a system-independent function could provide.
CreateProcess - makes a new process, allows very fine control of the state(for example the process could be started in a suspended state, which is very useful if you want to do some other things before actually starting it) of this new process as well as starting parameters this process will have. spawn/exec libc equivalent, but much more featureful.
VirtualAllocEx - I'm not sure what the POSIX equivalent is, but it's probably doable with ptrate. This allocates a piece of memory, of a certain size, protection properties(read/write/execute/...), and a certain allocation mode(commited, reserved, highest-possible address, etc). This functions is needed for purposes such as remote debugging, or running a piece of your code in a remote process, such as hooking other people's code (there are also many other debugging APIs, such as remote exception handling, starting remote threads, changing page protection, and many more). *nixes are a bit worse than Windows in portable low-level debugging functionality because source is shared, and such functionality is not regarded as important.
In case you didn't realize yet, rewriting the application in either case is NOT AN OPTION, because there is nothing else that will do the job! If you wanted to do this in Linux, you'd have to either abuse implementation-specific syscalls, maybe even recompile your kernel to add support for some syscalls, or write a loadable kernel module to do it for you. In either case, this would be specific to your platform.
Name:
Anonymous2010-02-23 11:26
>>46
who the fag does program in notepad (or equivalent), ever?! lol
>>47
It's pretty clear you're fatuous, but those 3 functions have no value:
CreateFile gives you some arbitrary picked dwFlagsAndAttributes and the superficial hTemplateFile which add no more functionallity than open & co.
CreateProcess gives you nothing you cannot accomplish between fork and exec.
And instead of crippling your damned application for debugging with VirtuallAllocExec one could easily enjoy the way more portable non-standard debugging tools built using ELF and DWARF and/or by emulating the underlying hardware with fine-grained memory access control in a completely application-transparent manner.
In case you didn't realize yet, rewriting the application in either case is and OPTION but not REQUIRED, because there is nothing else necessary to do the job! If you want to get your anus haxed, for Bill's sake abuse some nearby bummer/nigger/fag, but stop ship applications which are defective by design because you know shit about debugging and/or writing portable software. In either case the above methods are currently in use on to more platforms than Windos was ported to.
So please, STFU if you know shit but fagging around your smattering. And apart from that you surely haven't read your SICP today.
Name:
Anonymous2010-02-23 12:28
>>31
variable 'language' not found
'madlib(0, language = "C")'
aborting compile
or running a piece of your code in a remote process, such as hooking other people's code
And that's why 9 out of 10 virus authors prefer Windows.
Name:
Anonymous2010-02-23 13:01
>>51
Use a non-shit compiler that supports 11-year-old standards
Name:
Anonymous2010-02-23 14:59
Guys, we all know that the C language is not sufficiently fucking insane in its orientation of code to make life seem easy when the fecal junctures of the Windows API are encountered, however this has nothing to do with D3D vs OGL.
>>67
It's true, there are Mac users who use their McBooks for gaming. I know a couple. One of them lives in Alaska so he can use his laptop outside, and the other has a dedicated walk-in freezer for this purpose. Because otherwise they run into heat issues, because Macs don't have cooling systems. Another person I know actually had his Macbook Air melt from trying to play Tetris.
Name:
Anonymous2010-02-23 17:00
>>68
Nope. EYE MENA gaming has finally come to the Mac. Welcome to 2006.
>>69
Or they could save themselves all that trouble and put together a Hackintosh. You don't need an actual Mac to run OS X these days.
Name:
Anonymous2010-02-23 18:13
>>29
What a total bullshit argument. OpenGL is written in pure C and it does not have this problem.
Name:
Anonymous2010-02-23 18:23
Also, the correct way of specifying a few of a shitload of arguments to a function is to do it with a struct. You stack-allocate the struct, zero it out, set only the attributes you want, then call the function with a pointer to the struct. POSIX sockets is a good example of this.
Oh, and sure, every year or so someone comes out with three or four Mac games that are shitty ports of the PC versions. They're never games that I want to play, and they always without fail run at about 10% of the speed they get under Windows, even on the same hardware. And that's because Apple's asshole-inhabiting shitty software hogs 90% of the CPU and GPU with the useless window animations, like making all the windows roll around like dice whenever you shake the mouse back and forth. If I wanted that, I'd overdose on acid and spend the rest of my life in a blissful coma with the hospital bills eating up my inheritance, AND IT WOULD STILL BE CHEAPER THAN BUYING A FUCKING MAC
Name:
Anonymous2010-02-23 18:44
>>73
What are you talking about? My Mac runs nethack just fine.
>>76
eww, I do have FBSD, Solaris, and even OVMS on VMs, but why the hell would I want Linux?
Name:
Anonymous2010-02-23 19:09
>>77
s/Linux/Unix/, then. At least you've got a real OS with a command line alongside that overpriced paint program API.
Name:
Anonymous2010-02-23 19:12
>>71
OpenGL is a pretty bad example here since it's full of state and you have to bind shit and configure client state up the wazoo to get shit done. It works, but it could definitely stand the long promised rebirth into this side of the millennium.
Name:
Anonymous2010-02-23 19:52
>>79
Of course OpenGL is full of state. It's a state machine. That's sort of the point.
I'm not saying it's the best, but it's nothing resembling the worst. (Personally I am fond of the way it works, but I accept with complete humility that many programmers would simply hate it.)
>>78
You should get out of your mom's basement once every few years to check up on the world. Mac is UNIX® now.
Name:
Anonymous2010-02-23 20:56
>>82
It's like people somehow forgot that Apple slapped a shiny Metacity theme on BSD and pretended it was a new operating system.
Name:
Anonymous2010-02-23 21:29
>>29 Does the 360 support OpenGL at all?
No. It was called the DirectX Box, and was designed to give Microsoft a stronger position in the gaming market by forcing game developers to develop for DirectX (and by extent Windows) if they want to target the console.
Name:
Anonymous2010-02-23 21:50
>>84
The fun part is where they intentionally forced delays in the Halo Windows releases to help promote their Windows gaming promotion box.