Hacker News new | past | comments | ask | show | jobs | submit login
Valve's OpenGL debugger open-sourced (github.com/valvesoftware)
264 points by z3phyr on March 13, 2014 | hide | past | favorite | 34 comments



Well, now people can sure stop complaining that Valve is only using GitHub for the issue tracker. ;)


For anyone doing GLSL work, here's a shader debugger that is quite useful: http://www.vis.uni-stuttgart.de/glsldevil/

Would love to see someone with resources (i.e. Valve) somehow maintain it (or do something similar).

Here's an open source fork: http://glsl-debugger.github.io/


There's a built-in WebGL shader editor in Aurora that's very slick: https://hacks.mozilla.org/2013/11/live-editing-webgl-shaders...

Nice to be able to alter your GLSL and see the results on the web page immediately.


Wow- Valve's on a roll! I wonder what else we will see open sourced from them in the next couple of weeks.

They're probably talk more about whatever they're up to at GDC this year.


Not just open source, but free under the MIT licence.

https://github.com/ValveSoftware/vogl/blob/master/LICENSE


It's a good sign that companies like Valve and Sony are releasing some of their tools to the public.

Perhaps they're feeling the pressure of more open/accessible tools like unity or unreal engine.


"Valve and Sony" are apples and oranges. Valve hasn't been a publisher (in the usual sense) or a platform creator until very recently. They've been a retailer and a developer. As a retailer, Valve has an incentive to grow the industry as a whole, and as a developer, they have an incentive to get people onto platforms that are easy for them to develop and sell products for.

They've chosen to tackle these interests by deliberately doing things "wrong" right from the beginning. SteamOS/Steambox is all about having an open, accessible platform, and the release of development tools is all about getting people to develop for this platform so that users will adopt it.


I'd be willing to generalize that it's nice to see fruits available.


Unity isn't exactly "open," it's actually closed source which can be a big pain if something goes wrong. Compared to traditional game development where usually you have access to all the source it is a big pain (for me at least).


> Compared to traditional game development where usually you have access to all the source it is a big pain (for me at least).

Which commercial engines do offer full source code access?


All of them? It's unheard of at a AAA development level to sell an engine without full source access; CryENGINE, Unreal, iD Tech, and Gamebryo all offer full source licenses, to name a few examples.


Thanks for the info.


Any 3rd party engine used by a AAA game will have full source. Unreal Engine, Crytek, Source, etc. Sometimes those engines have cheap, no-source indie targeted licenses but the high end games paying the high price tag has source.


Hopefully they'll use it to make Dota 2 for Linux comparable to Dota 2 for Windows :)

Right now it doesn't perform well at all (using 2x more memory and being significantly slower on Intel GPUs) , and still comes with an annoying sound bug (https://github.com/ValveSoftware/Dota-2/issues/770)


It may be related to Intel's drivers, as I am playing Team Fortress 2 on Linux, which is I believe native OpenGL, and it is significantly slower than on Windows with an intel GPU.


I think it is since I get a higher frame rate for Team Fortress 2 under Linux than under windows. I use the nvidia blob.


A presentation from the developers about vogl and ToGL http://www.youtube.com/watch?v=45O7WTc6k2Y

The part about vogl starts at around 33 minutes and a demo at 40 minutes.


Now how about that cool drill-down tool I've been hearing about :D

Edit: I'm... I'm an idiot! Apparently this is the tool I'm thinking of, or at least something similar.


Note that they have a listserv website setup, but the top level domain doesn't seen to host anything yet.

http://lists.voglproj.com/listinfo.cgi/dev-voglproj.com


For someone not familiar with the Valve stack, does this work with any OpenGL application? Or is it only for those using Valve's SDK?


This replaces the opengl dynamic library, similar to apitrace. It should work for any opengl app (the example they use is a simple gl app that draws some spheres). When the app makes an opengl call, it logs it to tmp before forwarding it on to the real opengl library. It's kind of like strace for graphics...

Then, there are tools to analyze and inspect those logs. You can presumably replay a frame, and step through each GL call and inspect the data it is sending. I haven't tried building this yet, but it looks like it includes a tool to replay the GL calls, and some kind of interactive GUI.


I have been checking the code for the generation of the spheres. I never developed C++ professionally. Is this code considered good C++ practice? I mean I saw "using namespace std", and exceptions using cout.


If it's just a simple demo app, I probably wouldn't use it as a example of good C++ practice.

Many C++ devs have a different idea on what idiomatic C++ should look like. C++11 really shakes things up as well.

There's no reason a "using namespace std;" is bad, as long as it isn't in the header. If it's in the header file, every file that includes that header will have it's namespace polluted with std declarations, and this leads to a big nasty chain of potential name conflicts (one header file includes another and so on and so forth).


Right, it makes perfect sense. Thanks for that.


Is there a system on which vsnprintf doesn't NUL-terminate the string after a successful non-zero return?


VC++, if the number of characters to write is exactly equal to count, will return count without inserting a null:

http://msdn.microsoft.com/en-us/library/1kt27hek.aspx


Incredible.. thanks.

For longer strings, it also seems to return -1 instead of doing what the standard says.


Really love what Valve is doing here. Game development needs some awesome opensource love.


Awesome!


Can someone explain what is the significance of this and the applications? What does it mean by opengl capture and playback debugger?


Historically the state of OpenGL debugging and profiling tool is quite a mess unfortunately, especially on OSX and Linux. D3D always came with a matching PIX for capture-analysis (capture frames and step through them), and NVIDIA's PerfHUD for live-analysis (analyse the running game with a realtime overlay). For OpenGL there was gDebugger which was commercial, then free, and hasn't been updated in years and probably is stuck to an old GL version. Then there's NVIDIA Nsight which seems to be limited to NVIDIA GPUs (but has a very nice VisualStudio integration). Apple only seems to care about GLES on iOS, not desktop GL. So VOGL could really fill a gap.


Valve need to encourage game devs from a console and windows centric world to develop for the SteamEngine platform. PIX (http://en.wikipedia.org/wiki/PIX_%28Microsoft%29) is one of the tools these developers are used to dealing with. So having a Linux equivalent is pretty valuable.


It can capture all OpenGL drawing commands made by an application and then replay it frame by frame. Valve devs gave a presentation about it including a demo. http://www.youtube.com/watch?v=45O7WTc6k2Y The part about vogl starts at around 33 minutes and the demo at 40 minutes.


opengl [1] is the graphics library that underpins most of the animation and rendering that games ( and your browser ) do.

This app allows you to trace and capture events in code that calls openGL and to follow what's actually happening.

1. http://www.opengl.org/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: