
Valve's OpenGL debugger open-sourced - z3phyr
https://github.com/ValveSoftware/vogl
======
ChrisClark
Well, now people can sure stop complaining that Valve is only using GitHub for
the issue tracker. ;)

------
strebler
For anyone doing GLSL work, here's a shader debugger that is quite useful:
[http://www.vis.uni-stuttgart.de/glsldevil/](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/](http://glsl-
debugger.github.io/)

~~~
DocSavage
There's a built-in WebGL shader editor in Aurora that's very slick:
[https://hacks.mozilla.org/2013/11/live-editing-webgl-
shaders...](https://hacks.mozilla.org/2013/11/live-editing-webgl-shaders-with-
firefox-developer-tools/)

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

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

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

[https://github.com/ValveSoftware/vogl/blob/master/LICENSE](https://github.com/ValveSoftware/vogl/blob/master/LICENSE)

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

~~~
nknighthb
"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.

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

------
vrodic
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](https://github.com/ValveSoftware/Dota-2/issues/770))

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

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

------
fafner
A presentation from the developers about vogl and ToGL
[http://www.youtube.com/watch?v=45O7WTc6k2Y](http://www.youtube.com/watch?v=45O7WTc6k2Y)

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

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

------
kyrra
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](http://lists.voglproj.com/listinfo.cgi/dev-voglproj.com)

------
hrjet
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?

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

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

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

~~~
dsaravel
Right, it makes perfect sense. Thanks for that.

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

~~~
ramchip
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](http://msdn.microsoft.com/en-
us/library/1kt27hek.aspx)

~~~
clarry
Incredible.. thanks.

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

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

------
kcbanner
Awesome!

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

~~~
olefoo
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/](http://www.opengl.org/)

