News for hackers. Stuff that matters.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @12:56PM (#5493682)
I'm actually surprised that there isn't more support for a native Linux version of Direct3D. It is by far the better of the two APIs, both in terms of ease of use and more closely conforming to the model used by video hardware itself. Since the future of remote Linux desktops is going to be based on Microsoft's RDP rather than X, it makes sense for the open source community to adopt a better Microsoft technology when it comes along.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by btian on Thursday April 04, 2013 @01:43PM (#5493992)
>surprised that there isn't more support for a native Linux version of Direct3D

There is no surprise. D3D is proprietary while OpenGL is open standard.

>It is by far the better of the two APIs

I highly disagree. Do you have any examples?

>Linux desktops is going to be based on Microsoft's RDP

What?? I've seen plenty of VNC in the wild, but yet to see any RDP

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by CamperBob2 on Thursday April 04, 2013 @02:23PM (#5494297)
I highly disagree. Do you have any examples?

OpenGL is a dog's breakfast of an API. It's everything an API shouldn't be -- stateful, verbose, and committee-driven. Just take a look at Valve's .PDF.

An OpenGL programmer spends a large part of his/her time trying to maintain a mental model of the underlying driver's state and behavior. And God(s) help you if you step off the path used by popular applications and game engines. You can expect combinatorial bugs out the wazoo, again because the API and driver layers are so stateful.

I agree with the grandparent -- it's well past time that a D3D-like API was adopted by other players. I've used OpenGL since the Quake 1 days and I've never understood why so many people sing its praises. The days when D3D was an inferior API are more than a decade behind us.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by dman on Thursday April 04, 2013 @02:34PM (#5494394)
One reason to sing opengl's praises - cross platform.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @03:37PM (#5494762)
That's bullshit. In practice different GPU parts support different subsets of OpenGL's shader model, leading to broken graphics depending on the GPU. This is a huge problem in, for example, Android games, where you have to test on just about every device to see what works and what doesn't.

OpenGL is cross-platform because it's legacy. It is primarily of interest to outdated CAD software vendors, because that's who's driving the API specs, hence why it took so long for the fixed-function pipeline to finally be dropped. Modern CAD vendors, such as Autodesk, render through a Direct3D pipeline.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by jra101 on Thursday April 04, 2013 @04:33PM (#5495116)
The Android issue is entirely caused by shitty drivers. Pretty much all mobile hardware after the original iPhone fully supports OpenGL ES 2.0 shaders which haven't changed since inception.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by dman on Thursday April 04, 2013 @04:52PM (#5495248)
Dont project the driver and the implementation issues onto the api. Have you looked at programming using the core opengl context in opengl 3.2?
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @06:52PM (#5495806)
Being verbose and committee-driven need not condemn a thing; Ada the programming language is both and is leaps and bounds better than its nearest competitor (C++).

but programming opengl still feels like setting up a rube goldberg machine for its initial run

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @01:48PM (#5494024)
A remote compositor that uses FreeRDP as its transport protocol was just checked into the Wayland mainline.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by jiggy2011 on Thursday April 04, 2013 @01:43PM (#5493990)
Wouldn't providing a solid Linux version of Direct3D rely on cooperation from Microsoft?

I know that Wine implements some forms of compatibility, but it's not perfect. Surely the risk would be that you could build DX11 for Linux but then DX12 moves all the goalposts again. Not to mention that there might be legal issues.

I wasn't aware that there was movement for RDP on Linux though.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @01:49PM (#5494037)
RDP is Wayland's remoting transport.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by jiggy2011 on Thursday April 04, 2013 @02:01PM (#5494128)
From the Wayland FAQ:

> "This doesn't mean that remote rendering won't be possible with Wayland, it just means that you will have to put a remote rendering server on top of Wayland. One such server could be the X.org server, but other options include an RDP server, a VNC server or somebody could even invent their own new remote rendering model."

So looks like it could be an option in wayland, but not the only one.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @02:10PM (#5494196)
Maybe not the only one, but an RDP remoting compositor was just checked into core and the Wayland devs are evangelizing moving to Wayland+RDP over X or VNC, so the rest of the community will likely follow suit.

Personal rant: Never mind that X11 does the same sorts of pixmap caching that RDP does to get its speed. Never mind that braindead toolkit developers render into offscreen local rectangles, and then transmit the entire rectangles as bitmaps into X, thus using none of this capability, which is why X is observed to be "slow" and "chatty". The conventional wisdom is that RDP is faster than X, so that's what we'll be using.

Meanwhile, Direct3D is quite a bit better than OpenGL, on a number of fronts.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by voltagex_ on Thursday April 04, 2013 @10:51PM (#5496569)
Hey, would you mind elaborating? I always wondered why RDP was miles faster than X when working remotely. Mind you, whatever the Teamviewer guys are doing is even more amazing.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by jiggy2011 on Thursday April 04, 2013 @11:59PM (#5496704)
From what I understand, RDP is fast because it can send vectors as well as just bitmaps. So if you want to display a button on the screen you can simply send the vectors for the 4 corners over the wire and say "this is a button, render it as such". RDP on Windows is implemented as a special video driver which can hook things like Win32 API calls to help with this process.

Compare that to something like VNC which IIRC simply sends the screen data over as a raw bitmap and must rely on (potentially lossy) compression in order to get reasonable speed. This of course has the advantage that the client software needs to be much less intelligent to understand it and means that it needs much less deep OS integration. This is why VNC clients and servers are available and can work easily between pretty much any platform.

The GP claims that X11 is capable of doing the same optimisations that RDP can do but this is not utilised well because the windowing toolkits such as GTK render their output to some other area of memory and X only gets to see the bitmapped result.

Not sure how teamviewer works, but I know some of these paid services use intermediaries to trasmit data over faster internet links to reduce latency but of course this costs them money so they have to charge you.

SO discussion here: http://stackoverflow.com/questions/9498877/how-is-teamviewer...

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by jeltz on Friday April 05, 2013 @04:40AM (#5497326)
I strongly agree with your rant. The current idea that X is slow is caused by toolkit developers working around X instead of trying to use X correctly and contribute to the project where X is lacking.

If the toolkit developers continue to render to bitmaps remoting on Linux will never be as fast as RDP for Windows.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by Scramblejams on Thursday April 04, 2013 @05:28PM (#5495410)
Hope somebody does one with a video codec, like Splashtop. If you can handle the CPU and bandwidth hit, the responsiveness is awesome.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by ysangkok on Thursday April 04, 2013 @01:31PM (#5493906)
Why not just fix OpenGL instead? Actually, it was fixed, but no-one knows how to use OpenGL 4 yet.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @02:14PM (#5494226)
OGL 4 still has too much state machine diddling and extension wrangling. In order to be fixed, it would have to drop a lot of state machine calls and replace them with a comprehensive object model to represent textures, shaders, geometry buffers, etc.; and there would have to be a comprehensive profile of current GPU functionality in the core API with a much faster release cycle.

In other words, it would have to become a lot more like Direct3D.

"Fixing" OpenGL to bring it into the current era of graphics development usually means making it look more like Direct3D anyway, so why not just go whole hog and adopt Direct3D?

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by btian on Thursday April 04, 2013 @05:43PM (#5495495)
Because Direct3D is not cross-platform.

You can't use that on the iOS devices, Android devices, OS X, Linux/Unix systems, PS3/PS4, Wii etc.

Re:Valve's GDC Talk: Porting Source to Linux [pdf] by bitwize on Thursday April 04, 2013 @06:56PM (#5495830)
There's a preliminary free implementation of Direct3D on top of Gallium by Luca Barbieri. Getting the community behind that would be a useful first step towards a native Direct3D rendering stack that could then be ported for use e.g. in iOS apps.
Re:Valve's GDC Talk: Porting Source to Linux [pdf] by pjmlp on Friday April 05, 2013 @03:02AM (#5497131)
There is NO OpenGL support on games consoles, why the people outside the industry keep on propagating this?!

Only the PS3 has some OpenGL API support, but it is so bad most studios use libcgm, the lower level API.