Page 2 of 11 FirstFirst 1234 ... LastLast
Results 11 to 20 of 103

Thread: For Those Interested In Direct3D Over Gallium3D

  1. #11
    Join Date
    Aug 2009
    Posts
    125

    Default

    Quote Originally Posted by elanthis View Post
    Oh, and regarding patents: Microsoft already has patents that cover OpenGL 3.x.
    Not only 3.x. In 2002 Microsoft bought all 3D-related patents from SGI the company that invented OpenGL. I wouldn't be surprised if OpenGL and Direct3D were largely covered by the same patents.

    I'm also not aware that Microsoft or any other company that owns patents related to OpenGL ever threatened Mesa for patent violations, even though Mesa (AFAIK) never formally licensed those patents.

    So supporting Direct3D or OpenGL probably makes no difference from a legal POV.

  2. #12
    Join Date
    Feb 2009
    Posts
    161

    Default

    Quote Originally Posted by elanthis View Post
    DX10/11 is an entirely different beast than DX9 and earlier.

    A lot of programmers also really hate the extension system of OpenGL. Sure, it's more flexible, but many devs don't give a shit. They just want to say "we're using DX9" and know exactly what features are going to be there, without needing to write every other bit of the graphics engine as "if GLEW says extension Foo exists then UseFoo else UseShittyWorkaround". Most of my OpenGL work just checks for some specific version of OpenGL, bails if that version isn't available, and only uses the core functionality of that version -- makes the code smaller, cleaner, saner, easier, and (IMO) better.

    There's also the matter of DX being a C++ OOP API, which more and more programmers are preferring over the procedural state machine API of GL.

    Plus, the DX API is inherently faster than OpenGL in some ways on account of not being a state tracker, because there are less built-in state transition points. For instance, an object in DX is configured once, while an object in GL can be reconfigured at almost any time. This in turn means the GL driver must be complicated and contain more tests (and hence more branches, and more overall code to try to fit in the CPU's code cache, both of which hurt performance quite badly on modern CPUs).

    Then there's the multi-threaded programming D3D allows that OpenGL currently does not. This is really important on modern hardware. With OpenGL, you can only do the client application processing of graphics data in multiple threads. You will then need to serialize the computed data through the main thread for submission to the driver. The driver, before it submits the data to the GPU, first does a series of validation checks as well as potential data conversion steps. D3D lets this validation and conversion happen in the individual threads, and only the actual dispatch of the command buffers has to happen in the main thread. D3D is hence inherently able to squeeze out better performance in multi-threaded rendering engines, which exist and are used in commercial titles today. Even the sophomore students' game engines at my school (all game titles are required to be written from scratch, ground up) are being written with multi-threaded physics and graphics components more and more often.

    You can also look at Carmack's old GL vs DX post from years ago, and see how yesterday's "better" is today's "worse." It's actually very amusing to note how he thought that the now deprecated (and literally removed in OpenGL ES and OpenGL 3.1+ Core Mode) glBegin/glVertex/glEnd sequence is better than vertex buffers at all. Quite simply, for modern hardware and modern drivers, the old GL method is just incredibly slow and stupid. It can and does result in _massive_ performance degradation from the overhead of making multiple indirect function calls for every vertex attribute. His argument that the old GL 1.x API was easier isn't even that accurate; his code sample of using a vertex buffer looked ugly because he made it look ugly, not because using them is actually difficult or even remotely that bad looking. Modern engines are keeping buffers of vertex data around anyway for CPU-side culling and effects, and it's actually even easier to use DX/GL vertex buffers than it is to use the old GL 1.x API.

    I still think it would be neat for someone to define a new, Open API that gives us what Longs Peak was supposed to be: modern OO stateless 3D API targeted at modern hardware. Essentially, in a way, implement D3D 11 with different names/identifiers, and use GLSL 4.10 as the shading language (including support for pre-compiled shaders). Try to get D3D 11's multi-threaded rendering support in, too, that's pretty important these days. (It's possible to implement a much slower version of that in GL, but it's impossible to do it as efficiently in GL due to the nature of the API.) Add an extension framework if you really want, but for the love of God keep the library versioned and based on hardware generations, so if a developer wants to keep his sanity and just use library v.X, he can, and knows exactly what he's getting, and users can easily know if their hardware is or is not v.X compatible. That's incredibly more useful and important than being able to use extensions.
    Most accurate post I've seen on the subject. Thanks for taking the time to write what I've always wanted to but had no patience to do so.
    I hope this post is enough to convince people that D3D is actually better than OGL.
    Now count me in on the "people who think we need a new open API" list.

    Quote Originally Posted by TemplarGR View Post
    There is a reason D3D is better currently than OpenGL: It is more widely used.
    Disagree, see elanthis' post.

    Quote Originally Posted by TemplarGR View Post
    It is obvious Wine developers do not want this code because of their ego. They can't stomach the fact that one guy beat them to it.

    Patents fears are pure BS. Those claiming potentialy patent infringement of a single API are those who have implemented the entire OS's apis... If this tracker violates patents, so the whole Wine project...
    Completely agree!

  3. #13
    Join Date
    Feb 2009
    Posts
    161

    Default

    Quote Originally Posted by 3vi1 View Post
    ...
    But back to the D3D subject: Can anyone tell me what's so different, legally, between writing a directx-replacement DLL that passes calls to the Gallium state tracker vs. one that uses an OpenGL backend? Both are dlls that implementat the API, and neither use the MS-written headers or reverse engineering (right?). If one's infringing (which I don't believe to be the case), why wouldn't both be? I seriously would like to know.
    I second this question.

  4. #14

    Default

    Quote Originally Posted by mdias View Post
    I second this question.
    Let me clarify the concern we have in Wine. There is nothing illegal essentially with writing a Direct3D11 to 'something' wrapper where the something is OpenGL, Gallium3d or any other API. The concern is that some of Luca's shader code was inspired by Windows DDK headers. The DDK can be freely downloaded but you have to agree to a specific EULA and that's the potential issue. It might be fine to look at DDK stuff but until we know for sure, we as Wine developers want to stay away from this stuff. In Wine we do only black box reverse engineering and we do our best to stay on the safe side.

    Next, if this code was indeed 'bad' it could also taint us and other developers who just download and compile Mesa from source (which is what some of us do). It is much easier to claim that lets say Wine code was not inspired by DDK stuff if this code was not on your hard disk in the first place.

    In private work is being done to resolve the potential license issues. Until then it would be better to not have articles like this every day.

  5. #15
    Join Date
    Aug 2010
    Posts
    33

    Default

    Doesn't it take longer to develop a completely new API.

  6. #16
    Join Date
    Oct 2007
    Location
    Under the bridge
    Posts
    2,142

    Default

    Quote Originally Posted by mdias View Post
    Most accurate post I've seen on the subject. Thanks for taking the time to write what I've always wanted to but had no patience to do so.
    I hope this post is enough to convince people that D3D is actually better than OGL.
    Now count me in on the "people who think we need a new open API" list.
    +++

    Historically, the reason why D3D became a cleaner API than OGL is that every single version was rewritten from scratch. The first versions were ugly but the API was gradually refined until it overtook OGL. OGL never did that (v2.0 was to be such a rewrite, as was v3.0, but both met resistance within the ARB) so we are stuck with bad design decisions from 15 years ago (even more if you count IrisGL).

    That said, I'm not sure a brand new API is the correct answer now. We took this approach for Linux audio and the results weren't the best.

    Quote Originally Posted by Thunderbird
    Let me clarify the concern we have in Wine. There is nothing illegal essentially with writing a Direct3D11 to 'something' wrapper where the something is OpenGL, Gallium3d or any other API. The concern is that some of Luca's shader code was inspired by Windows DDK headers. The DDK can be freely downloaded but you have to agree to a specific EULA and that's the potential issue. It might be fine to look at DDK stuff but until we know for sure, we as Wine developers want to stay away from this stuff. In Wine we do only black box reverse engineering and we do our best to stay on the safe side.

    Next, if this code was indeed 'bad' it could also taint us and other developers who just download and compile Mesa from source (which is what some of us do). It is much easier to claim that lets say Wine code was not inspired by DDK stuff if this code was not on your hard disk in the first place.

    In private work is being done to resolve the potential license issues. Until then it would be better to not have articles like this every day.
    Makes sense.

  7. #17
    Join Date
    Feb 2009
    Posts
    161

    Default

    Quote Originally Posted by BlackStar View Post
    ...
    That said, I'm not sure a brand new API is the correct answer now. We took this approach for Linux audio and the results weren't the best.
    ...
    Why not? (just genuinely asking)
    Now that Gallium3D is emerging I would like to believe it's perfect timing.

  8. #18
    Join Date
    Aug 2009
    Posts
    2,264

    Default

    +10 internets to Elanthis.

    Count me in the "a new Longpeaks API please" camp and keep me out of the "D3D 10/11 is needed on Linux".

  9. #19
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,790

    Default

    It's funny how people who claim that "Linux is about choice" (which is true) try to have the choice of using D3D in Linux removed.

    Why don't we let people choose what they like. D3D is just as viable as GL. You don't want to use D3D, then don't. No one's forcing you. But if some people prefer to use D3D, it's not up to you to stop them. Having D3D as a choice is nice, since, as you claim, "Linux is about choice."

  10. #20
    Join Date
    Dec 2009
    Location
    Greece
    Posts
    351

    Default

    Quote Originally Posted by RealNC View Post
    It's funny how people who claim that "Linux is about choice" (which is true) try to have the choice of using D3D in Linux removed.

    Why don't we let people choose what they like. D3D is just as viable as GL. You don't want to use D3D, then don't. No one's forcing you. But if some people prefer to use D3D, it's not up to you to stop them. Having D3D as a choice is nice, since, as you claim, "Linux is about choice."
    Let me extend this a bit, and add that if someone uses Linux(or other UNIX like systems) just because he hates Microsoft, he is doing it the wrong way...

    We should use whatever covers our needs. We should be using Linux because it is what we need, not because we hate a company.

    Windows(especially 7) is a wonderful OS with a vast collection of useful software. And it is by far the most advanced in graphical capabilities. Of course Microsoft is not a company of saints, but we are judging their product, not themselves.

    I am using Linux because i like it, and whatever Windows offers i do not need. If i wanted to game heavily, or was a photoshop professional, i would switch in an instant.

    Direct3D, is a really good API, and it is universally used. I would really like having it available in Linux.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •