Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

Opengl

Name: Anonymous 2010-02-21 13:51

Riddle me this:

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?

Name: Anonymous 2010-02-21 13:56

Microsoft told them to.

Name: Anonymous 2010-02-21 16:00

They're game developers, what'd you expect? They just use whatever MS bribed their school to teach them.

Name: Anonymous 2010-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: Anonymous 2010-02-21 18:17

Writing code for multiple platforms goes FAR beyond the choice of graphics API.

Name: Anonymous 2010-02-21 18:27

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.

Name: Anonymous 2010-02-21 20:09

>>6
Sources for 1 and 2? I don't doubt that that IS something they MIGHT pull, but I haven't heard anything about that.

And as far as DirectX goes, that's just plain FUD. They haven't bothered with backward compatibility at all, so their API is very clean and elegant.

Name: Anonymous 2010-02-22 2:45

>>7
You're saying that there's FUD... directed toward DirectX? Well, that's a new one.

Name: Anonymous 2010-02-22 3:33

>>8
Yes. Perhaps you can counter with something other than zealotry?

Name: Anonymous 2010-02-22 5:32

Also in the DirectX development labs at Redmond, WA, they have a kiddie rape dungeon and also have negro slaves

Name: Anonymous 2010-02-22 6:14

>>10

Obviously.

Name: Anonymous 2010-02-22 7:02

>>10
I didn't know you used this board, RMS Matthew Stallman.

Name: Anonymous 2010-02-22 11:36

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.

Name: Anonymous 2010-02-22 13:03

>>12
RMS doesn't post here, he's too busy with the negro slaves and kiddie rape dungeon that the FSF are making and releasing under the GKRL.

Name: /prog/in search of survivers! 2010-02-22 16:07

Any [color="green"]oldskool[] programming related textboards around?

Name: Richard !StaLManL6s 2010-02-22 16:15

>>14
Fuck you.

Name: Anonymous 2010-02-22 16:20

Where can I learn how to OpenGL?

Name: Anonymous 2010-02-22 17:11

tenderly fondle my anus

Name: Anonymous 2010-02-22 17:12

I do not blaspheme the religion you believe in.

Name: Anonymous 2010-02-22 17:22

>>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: Anonymous 2010-02-22 17:39

>>20
patchouli
Smelling patchouli is like trolling my nose.

Name: Anonymous 2010-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: Anonymous 2010-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: Anonymous 2010-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'."

Name: Anonymous 2010-02-22 20:10

>>21
I'd smell Patchouli. ;_;

Name: Anonymous 2010-02-22 20:51

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).

Name: Anonymous 2010-02-22 22:34

>likes Microsoft's APIs (Win32 and friends).
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL

Name: Anonymous 2010-02-22 23:16

>>26
One word: Xbox 360

Name: Anonymous 2010-02-22 23:30

>>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.)

Name: Anonymous 2010-02-22 23:43

>>29
tldr; valid criticism

Name: Anonymous 2010-02-23 2:12

You can do keyword arguments in C, and even optional params.


#include <stdio.h>

int __madlib(int r, char *music, char *language, char *adjective)
{
    printf("I listen to %s while coding in %s because I am %s\n",
        music, language, adjective);
    return r;
}
#define madlib(r, ...) ({ char *music = "Infected Mushroom", *language = "Java", *adjective = "1337"; __VA_ARGS__; __madlib(r, music, language, adjective); })


int main(int argc, char **argv)
{
    return madlib(0, language = "C");
}

Name: Anonymous 2010-02-23 3:26

>>31
Aleph One was here
buffer is loser

Name: Anonymous 2010-02-23 3:28

>>32
Do go on.

Name: Anonymous 2010-02-23 6:36

>>31
considered harmful

Name: Anonymous 2010-02-23 6:48

>>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: Anonymous 2010-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.

Name: Anonymous 2010-02-23 7:13

>>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.

Try redesigning these fairly common APIs while keeping all the functionality:
http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
(CreateFile)
http://msdn.microsoft.com/en-us/library/aa366890(VS.85).aspx (VirtualAllocEx)
http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx
(CreateProcess)
Most of the time, operations have to be atomic. Spreading it through multiple function calls would require defering the actual action, and you'd end up specifying a lot of those arguments anyway. Wether this is a solution or a problem is unknown to me.

Name: Anonymous 2010-02-23 9:02

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: Anonymous 2010-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: Anonymous 2010-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.

Name: Anonymous 2010-02-23 10:39

>>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).

Name: Anonymous 2010-02-23 10:43

>>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: Anonymous 2010-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: Anonymous 2010-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.

Name: Anonymous 2010-02-23 11:13

>>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.

Name: Anonymous 2010-02-23 11:19

>>44
Looks like someone doesn't remember the pain of programming in notepad (or equivalent).

Name: Anonymous 2010-02-23 11:24

>>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: Anonymous 2010-02-23 11:26

>>46
who the fag does program in notepad (or equivalent), ever?! lol

Name: Anonymous 2010-02-23 12:12

>>48
FrozenVoid

Name: Anonymous 2010-02-23 12:17

>>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: Anonymous 2010-02-23 12:28

>>31
variable 'language' not found
'madlib(0, language = "C")'
aborting compile

?

Name: Anonymous 2010-02-23 12:52

Name: Anonymous 2010-02-23 12:54

Name: Anonymous 2010-02-23 12:59

>>53
thejewsareheretoeatyourso.ul

Name: Anonymous 2010-02-23 13:00

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: Anonymous 2010-02-23 13:01

>>51
Use a non-shit compiler that supports 11-year-old standards

Name: Anonymous 2010-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.

Name: Anonymous 2010-02-23 15:32

>>1
some extra sales on GNU/Linux and Macintosh
( ≖‿≖)

Name: Anonymous 2010-02-23 15:35

GNU/Lunix or for short Gnulix is composed of entirely free software.
There is no way the users of Gnulix would pay anything.

Name: Anonymous 2010-02-23 15:36

Also, Mac users don't know what the word "game" means. They thing it's a weird pronunciation of "gay 'em" which roughly translates as "turn them gay"

Name: Anonymous 2010-02-23 16:05

>>60
Which they're of course already.

Name: Anonymous 2010-02-23 16:08

>>61
their

Name: Anonymous 2010-02-23 16:09

>>62
their anus

Name: Anonymous 2010-02-23 16:09

>>61
It was instructions for the Mac Users to go recruiting more homosexuals

Name: Anonymous 2010-02-23 16:11

>>64
I though they need no instructions to do so...

Name: Anonymous 2010-02-23 16:19

>>65 They don't, they've got the Stockholm syndrome, they do this anyway. But "game" still is an instructions to them meaning immediate gay action.

Name: Anonymous 2010-02-23 16:29

>>60
This was true until Apple made the switch to x86. Now they can run both OS X and Windows. Gaming has finally come to the Mac.

Name: Anonymous 2010-02-23 16:31

>>67
U MENA gaming has finally came to the x86...

Name: Anonymous 2010-02-23 16:48

>>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: Anonymous 2010-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: Anonymous 2010-02-23 18:13

>>29
What a total bullshit argument. OpenGL is written in pure C and it does not have this problem.

Name: Anonymous 2010-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.

    struct sockaddr_in serv_addr;
    memset(&serv_addr, 0, sizeof(serv_addr));
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_addr.s_addr = INADDR_ANY;
    serv_addr.sin_port = 8000;
    if (bind(sockfile, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
      assert(0 && "error binding");


The idea that NULL, NULL, NULL, NULL, NULL is the only way to achieve so-called "highly-functional" atomic APIs is ludicrous.

Name: Anonymous 2010-02-23 18:25

>>70
So I can waste 200GB of hard drive space, for an OS that won't run games, on a machine that I built for gaming. I like that plan!

Name: >>73 continued 2010-02-23 18:44

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: Anonymous 2010-02-23 18:44

>>73
What are you talking about? My Mac runs nethack just fine.

Name: Anonymous 2010-02-23 18:47

>>75
...after installing Linix ( °‿‿°)

Name: Anonymous 2010-02-23 19:06

>>76
eww, I do have FBSD, Solaris, and even OVMS on VMs, but why the hell would I want Linux?

Name: Anonymous 2010-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: Anonymous 2010-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: Anonymous 2010-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.)

Name: Anonymous 2010-02-23 20:25

>>78
OS X has a command line too, you insensitive clod.

Name: Anonymous 2010-02-23 20:47

>>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: Anonymous 2010-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: Anonymous 2010-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: Anonymous 2010-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.

Name: Anonymous 2010-02-23 22:05

>>83
Are you suggesting Metacity is older than OS X?

Name: Anonymous 2010-02-23 22:28

Metacity has more of a Windows 9x look to it with some OS X looking-ish icons thrown in.

Name: Anonymous 2010-02-23 23:30

>>86
No, and I don't care what WM they actually used. But the fact is, OS X is just BSD with a new WM skin and some marketing.

Name: Anonymous 2010-02-24 2:59

>>88
It's also Solaris, or would have been if they had been able to include ZFS as well as DTrace. I'm kinda bummed about that actually.

Name: Anonymous 2010-02-24 4:13

>>88
( ≖‿≖)

Name: Anonymous 2010-02-24 9:09

>>88
The OSX desktop uses and extends the OpenStep protocol and is now no longer OpenStep compatible.

Name: Anonymous 2010-02-24 15:12

>>91
Goddammit. That's just like Microsoft: Embracing, extending, and extinguishing. Fuckin' Microsoft.

Name: Anonymous 2010-02-24 15:22

Does BSD use XML for it's config files?

Name: Anonymous 2010-02-24 16:34

>>93
Like Solaris does? God I hope not, XML configs are an abomination.

Name: Anonymous 2010-02-24 16:53

>>94
WELCOME TO MAX OS TEN

Name: Anonymous 2010-02-24 17:05

>>95
U MENA ☭☭☭ MARX OS ☭☭☭?

Name: Anonymous 2010-02-24 18:14

SO ABOUT THEM OPEN GEE ELLS

If you guys are going to troll operating systems, could you at least remember to sage? I was sort of interested in this thread's topic for reals.

Name: Anonymous 2010-02-24 18:16

I downloaded MikeOS the other day. Shit was so cash. I loaded it up in a VM and played hangman

Name: Anonymous 2010-11-13 12:26

Name: Anonymous 2010-11-25 20:32

Don't change these.
Name: Email:
Entire Thread Thread List