OpenGL and DirectX

PC related discussion and other issues.

OpenGL and DirectX

Postby Dionysos on Thu Apr 29, 2010 12:57 am

I found this article very concise and interesting and I'm posting it in case anyone here might feel the same way:

"Why you should use OpenGL and not DirectX"
http://blog.wolfire.com/2010/01/Why-you ... ot-DirectX
Often, when we meet other game developers and say that we use OpenGL for our game Overgrowth, we're met with stares of disbelief -- why would anyone use OpenGL? DirectX is the future. When we tell graphics card representatives that we use OpenGL, the temperature of the room drops by ten degrees.

This baffles us. It's common geek wisdom that standards-based websites, for instance, trounce Silverlight, Flash, or ActiveX. Cross-platform development is laudable and smart. No self-respecting geek enjoys dealing with closed-standard Word documents or Exchange servers. What kind of bizarro world is this where engineers are not only going crazy over Microsoft's latest proprietary API, but actively denouncing its open-standard competitor?
The Venus Project wrote:The most valuable, untapped resource today is human ingenuity.
User avatar
Dionysos
Senior Member
Senior Member
 
Joined: Thu Feb 02, 2006 12:30 am
Location: Slush

Re: OpenGL and DirectX

Postby Black Sheep on Thu Apr 29, 2010 2:17 am

DirectX handles more than the 3d rendering
here are the API's in DirectX
The components of DirectX are

* DirectDraw: for drawing 2D Graphics (raster graphics). Now deprecated (in favor of Direct2D), though still in use by a number of games and as a video renderer in media applications.
* Direct3D (D3D): for drawing 3D graphics.
* DXGI: for enumerating adapters and monitors and managing swap chains for Direct3D 10 and up.
* Direct2D for 2D Graphics
* DirectWrite for Fonts
* DirectCompute for GPU Computing
* DirectInput: for interfacing with input devices including keyboards, mice, joysticks, or other game controllers. Deprecated after version 8 in favor of XInput for Xbox 360 controllers or standard WM INPUT window message processing for keyboard and mouse input.
* DirectPlay: for communication over a local-area or wide-area network. Deprecated after version 8.
* DirectSound: for the playback and recording of waveform sounds.
o DirectSound3D (DS3D): for the playback of 3D sounds.
* DirectMusic: for playback of soundtracks authored in DirectMusic Producer.
* DirectX Media: comprising DirectAnimation for 2D/3D[25] web animation, DirectShow for multimedia playback and streaming media, DirectX Transform for web interactivity, and Direct3D Retained Mode for higher level 3D graphics. DirectShow contains DirectX plugins for audio signal processing and DirectX Video Acceleration for accelerated video playback.
* DirectX Diagnostics (DxDiag): a tool for diagnosing and generating reports on components related to DirectX, such as audio, video, and input drivers.
* DirectX Media Objects: support for streaming objects such as encoders, decoders, and effects.
* DirectSetup: for the installation of DirectX components, and the detection of the current DirectX version.

DirectX functionality is provided in the form of COM-style objects and interfaces. Additionally, while not DirectX components themselves, managed objects have been built on top of some parts of DirectX, such as Managed Direct3D[26] and the XNA graphics library[27] on top of Direct3D 9.

Here are the Api's for OpenGl
* OpenGL Shading Language revision 4.00 (GLSL)
* Two new shader stages that enable the GPU to offload geometry tessellation from the CPU.
* Per-sample fragment shaders and programmable fragment shader input positions for increased rendering quality and anti-aliasing flexibility.
* Shader subroutines for significantly increased programming flexibility.
* Separation of texture state and texture data through the addition of a new object type called sampler objects.
* Drawing of data generated by OpenGL or external APIs such as OpenCL, without CPU intervention.
* 64-bit double precision floating point shader operations and inputs/outputs for increased rendering accuracy and quality.
* Performance improvements; such as instanced geometry shaders, instanced arrays and a new timer query.

all 3d rendering
no sound, internet networking, or tessellation
It makes a lot more sense to use something that is more complete than write it all yourself
[img width="400" height="100"]http://i299.photobucket.com/albums/mm300/blacksheep987/ice-sig.png[/img]
User avatar
Black Sheep
Regular
Regular
 
Joined: Sun Feb 01, 2009 2:27 am

Re: OpenGL and DirectX

Postby Dionysos on Thu Apr 29, 2010 3:19 am

I'll admit that I'm not very knowledgeable in this field, but I was under the impression that tessellation is supported by OpenGL. If not, what does this/this mean?

I was also under the impression that DirectX is always preferred on the basis of its graphics (Direct3D), not the whole "suite". There are other solutions available for the rest if you go with OpenGL, you don't have to "write it all yourself". Not to mention that you don't have to go either/or, but possibly both (for several platforms), as I understand it(abstraction/encapsulation of renderer). Anyone here know more?

Anyways, I think the main focus of the article was the relationship between OpenGL and DirectX->Direct3D.
The Venus Project wrote:The most valuable, untapped resource today is human ingenuity.
User avatar
Dionysos
Senior Member
Senior Member
 
Joined: Thu Feb 02, 2006 12:30 am
Location: Slush

Re: OpenGL and DirectX

Postby CorporalAris on Thu Apr 29, 2010 7:31 am

Dionysos wrote:I'll admit that I'm not very knowledgeable in this field, but I was under the impression that tessellation is supported by OpenGL. If not, what does this/this mean?

I was also under the impression that DirectX is always preferred on the basis of its graphics (Direct3D), not the whole "suite". There are other solutions available for the rest if you go with OpenGL, you don't have to "write it all yourself". Not to mention that you don't have to go either/or, but possibly both (for several platforms), as I understand it(abstraction/encapsulation of renderer). Anyone here know more?

Anyways, I think the main focus of the article was the relationship between OpenGL and DirectX->Direct3D.


They still have to be supported by the cards to be implemented.

The cards drivers need to know what the shit to do with the shader.
Image
User avatar
CorporalAris
Been Here A While
Been Here A While
 
Joined: Tue Apr 22, 2008 10:10 pm

Re: OpenGL and DirectX

Postby xoqolatl on Sat May 01, 2010 10:22 pm

I always thought one of the reasons of DX's popularity was developers developing for both PC and X360.
Image
User avatar
xoqolatl
May Contain Skills
May Contain Skills
 
Joined: Mon Nov 13, 2006 9:11 pm
Location: Warsaw / Poland

Re: OpenGL and DirectX

Postby MáØ on Sat May 01, 2010 10:53 pm

The thing is, OpenGL is still (and likely, always will be) behind DirectX in a lot of ways visually. Now add in all the sound, networking, and better support from the industry and the choice is clear I think.

PS, what you linked was a BLOG not an article, big difference.
User avatar
MáØ
Pheropod
Pheropod
 
Joined: Fri May 22, 2009 5:14 pm
Location: BC, Canada

Re: OpenGL and DirectX

Postby Dionysos on Sat May 01, 2010 11:17 pm

Post then, it's written by a relatively successful indie developer though. And the visuals thing just isn't true.

But yeah everyone should make up their own mind.
The Venus Project wrote:The most valuable, untapped resource today is human ingenuity.
User avatar
Dionysos
Senior Member
Senior Member
 
Joined: Thu Feb 02, 2006 12:30 am
Location: Slush

Re: OpenGL and DirectX

Postby stoopdapoop on Sun May 02, 2010 1:04 am

MáØ wrote:The thing is, OpenGL is still (and likely, always will be) behind DirectX in a lot of ways visually. Now add in all the sound, networking, and better support from the industry and the choice is clear I think.

PS, what you linked was a BLOG not an article, big difference.


What do you mean by the visuals being behind?"
I'm Brown
Image
User avatar
stoopdapoop
Veteran
Veteran
 
Joined: Sun Aug 21, 2005 2:14 am
Location: Ann Arbor, MI

Re: OpenGL and DirectX

Postby xoqolatl on Sun May 02, 2010 10:45 am

MáØ wrote:The thing is, OpenGL is still (and likely, always will be) behind DirectX in a lot of ways visually.

You are aware that an API does not limit visuals?
Image
User avatar
xoqolatl
May Contain Skills
May Contain Skills
 
Joined: Mon Nov 13, 2006 9:11 pm
Location: Warsaw / Poland

Re: OpenGL and DirectX

Postby davidc538 on Sun May 02, 2010 12:00 pm

MáØ wrote:The thing is, OpenGL is still (and likely, always will be) behind DirectX...


lol no, OpenGL is capable of anything and everything direct3d is. as proof check out any number of pc games running on GL, or any game on ps3 or wii.
User avatar
davidc538
Been Here A While
Been Here A While
 
Joined: Mon Aug 11, 2008 4:27 pm

Re: OpenGL and DirectX

Postby ScarT on Sun May 02, 2010 4:42 pm

Biased article is biased.
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: OpenGL and DirectX

Postby Gary on Sun May 02, 2010 7:52 pm

davidc538 wrote:[...]or wii.


Really good example of graphical superiority. /end sarcasm]

Anyways, I am pretty sure I heard that both Win7/Vista have horrid support for OpenGL, so that pretty much destroys it's usefulness in my book. Even if Macs were better at gaming, I would never use them, lack of compatibility and the ability to practically upgrade.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: OpenGL and DirectX

Postby Vicpop on Thu May 06, 2010 12:46 am

the "locked hardware" that the macs use could be seen as a huge benefit: you have a much smaller set of possible hardware, so there doesn't need to be as much of an effort to support it on any user's system (one mac will be the same as most of the same variant), and the user won't have to keep up with rapidly progressing hardware and games' hardware requirements (which is probably one of the biggest reasons pc gaming is kind of dead overall) --maybe the developers will stop trying to just churn out the prettiest most detailed games graphically and start to think some actual new ideas

also, because OpenGL is supposedly poorly supported on Windows, you're going to totally disregard it? i've used several OpenGL-based applications (games), and I can't really tell you one that wasn't functional (or ran even kinda bad on my system)

My personal belief is that game developers shouldn't all be trying to make "huge" (talking GTA IV, FC2, Mass Effect, MW2, Bioshock, Crysis) games that push the boundaries technologically; they should be using the medium to express new ideas and push video gaming towards being considered an art form. An example I'll use is Silent Hill 2.

Image late 2001

The Playstation 2 wasn't the strongest console at its time-- underpowered, maybe. It wouldn't have been capable of rendering the environments that Silent Hill 2 employed in real time. The game, though, was developed around these limitations, and ultimately the console's limitations were utilized to the benefit of the game's narrative. For example (a blaring example), the fog that is so characteristic of the Silent Hill series; the Playstation 2 couldn't render some of the outdoors scenes without a big Z-clip. How can we keep this level of detail and keep it playable? Of the solutions available, what would be the most appropriate for the game? Use fog. Suddenly, not only do you have an effective solution to your performance problem, but you also have something that's affective emotionally that you can exploit to increase the player's immersion into the game's narrative.

Developers adapt to what they're given, but when they're handed such a grey area as the "Windows User's Hardware Configuration" using totally different technologies from widely varied parties combined with the then-inflicted strive for "amazing, new technology" they're put under stress to just make something that looks fancy to convince the typical "Windows User" that it's going to be an "awesome" experience playing the game on their brand new "rig", not only by the consumers but by the resourceful (money) technology giants.

I don't necessarily agree with everything Apple is doing, but in my opinion it was definitely a smart move to try and lock down the hardware as now it's a million times easier to support their userbase and it allows new, thin-walleted developers to work in their environment (did you notice that full-featured XCode is put onto the OS X installation disc? for free?) and (again) not have to worry nearly as much about possible hardware configurations.

Oh, and how this relates to the topic of the thread: OpenGL or DirectX? It doesn't matter. What game are you going to make? I'm trying to say that which graphics library you use is totally superficial; it's what will work best for you to express your ideas.
Vicpop
Been Here A While
Been Here A While
 
Joined: Mon Oct 15, 2007 3:03 am

Re: OpenGL and DirectX

Postby mastersmith98 on Thu May 06, 2010 1:32 am

Trying to determine which graphics api is better at producing "higher quality graphics" is akin to comparing the actual quality of the games themselves; it's purely a subjective matter. The greater support and better results you see from one or the other have nothing to do with what they're capable of, but what the industry gravitates towards and what people have had more experience working with. Granted, each api has some exclusive features that could be used by developers to produce better results, in the larger scheme of things this is irrelevant (besides maybe the new hardware tesselation stuff MS is working on, but that's not something that has to be exclusive to Direct X).

Direct X is only more supported because of Microsoft's proprietary strategy (similar to Mac's closed system strategy vicpop mentioned) that forces developers who work on either the PC or the 360 to use their api exclusively and since most developers would rather spend their time and money developing the game instead of readjusting themselves to a new graphics api (see Gabe Newell's rant on the core architecture of the PS3), they have to stick to one api/console. That's why you see the fissure between api's and especially consoles.

And speaking directly to vic: while the locked system strategy you mentioned makes it easier to develop one game that fits them all, there's also a lot of issues related to this. I'm not entirely sure if this is exclusive to the I-Phone or not, but on that system you basically have the hardware developer arbitrating certain publishing aspects of your game when it is published on their service and there is no alternative to that. Get it published there or not at all.

This is also a huge huge problem on the console side for anyone who isn't a top tier developer. You have to purchase a dev kit, worry about subsidiaries to the console manufacturer, etc, etc.

Right now it seems like most developers are pushing for everything you say vicpop, but with baby steps. Each new game I play is pushing those narrative and gameplay boundaries, trying to find new ways to engage the players in ways besides just pure eye candy. It's just hard to see all of these improvements since developers iterate per product product.

A major focus at the moment is to make games more accessible so that they can be enjoyed by a larger audience, after that I think you'll see a greater push for more gameplay advances and then finally narrative.

And as far as the games are art argument, it's never a good idea to produce something as a work of art simply to prove it is a work of art. Games are art, period. You can argue that all you want, but then you'd be a cunt like Roger Ebert. Point being, make good games, make games that prove your statement, don't go out of your way to do it.
MaK: I pwnd that Hello World and Variables tutorials
MaK: Now I'm downloading the Direct X SDK
User avatar
mastersmith98
1337 p0st3r
1337 p0st3r
 
Joined: Tue Nov 14, 2006 10:26 pm

Re: OpenGL and DirectX

Postby coder0xff on Thu May 06, 2010 2:52 am

The technology is still moving quickly, and a driving force like M$ working with NVidia contributes A LOT to it. Can you imagine where graphics hardware would be if there was no proprietary interest? Maybe that's a good thing, maybe that's a bad thing. For now, I'd say Direct3D is better - there is commercial interest in making sure it's on top and widely supported. I don't have to figure out which extension to enable for which manufacturer if I wanna use something like multisampling with DX, it's part of the interface. It's also more accessible for amateur developers, especially when you look at offspring technologies like XNA and SlimDX. If you look at the whole of DirectX, it's clearly the victor. Why have to bring in many assets, from OpenGL to OpenAL to who knows what when it's all in one place?

Maybe once there is no interest in improving GPU capabilities and applications, then it makes sense to have a big free open standard - because it's stable.
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Return to Hardware & Software

Who is online

Users browsing this forum: No registered users

cron