Tuesday, May 13, 2014

Windows build woes

If you happen to build vogl on windows and run into difficulties with voglgen, would you please let me know? You can add a comment here or post on github or tweet @basisspace.

Some developers have reported difficulties when they fetch vogl and build, but I'm not able to reproduce the issue even from a completely clean state which is driving me bonkers!

Thanks in advance!


Wednesday, May 7, 2014

vogl on Windows lives!


Disclaimer: vogl on Windows is not ready for anyone (other than me) to spend time on. The laundry list of things you cannot do with it yet is long. That said...


VOGL ON WINDOWS LIVES!!


As of now, you can actually capture a trace using vogl on Windows. The process is currently complicated, although it shouldn't remain this way for long. And you can't play the traces back anywhere, yet. You can dump the traces to JSON, but you need a Linux box to do so.

For posterity, I've included the current build and usage instructions below. I expect both of these to simplify pretty significantly in the near future.

Please note that everything here is subject to change, and so if you're viewing this page from the future it's probably a good idea to check with the official vogl website--the instructions and requirements below have probably changed significantly.

Someone set up us the Build

Requirements:
  • CMake 2.8 (I'm using 2.8.12.1) 
  • Visual Studio 2013 Update 1
    • I would expect that the Express version should work, but I haven't tested it).
  • git
Okay, with all these installed, our machine is ready to fetch source and go. 

Grabbing the source

vogl is currently contained in two separate repositories--one for the source for vogl itself and the other for support code for vogl. Open a command prompt to a suitable location, I will assume it's ${ROOT}.

git clone https://bitbucket.org/raddebugger/vogl_chroot.git
cd vogl_chroot
git clone https://github.com/ValveSoftware/vogl.git

Building x86

Open a command prompt.

cd ${ROOT}/vogl_chroot/vogl
mkdir _out
cd _out
cmake -G "Visual Studio 12" ..

Building x64

cd ${ROOT}/vogl_chroot/vogl
mkdir _out64
cd _out64
cmake -G "Visual Studio 12 Win64" ..

In either _out or _out64 there will now be a raddebugger.sln file, open this with Visual Studio 2013 and build as normal. The Debug and Release targets are supported--others are a byproduct of Cmake and are not (they will be removed at some point).

Capturing a trace

Capturing a trace is currently a manual process. The following things must be done:
  1. Copy ${ROOT}/vogl_chroot/vogl_build/bin/${Configuration}/vogltrace${BITS}.dll to opengl32.dll in the directory with your executable. Note that the destination is opengl32.dll, regardless of whether your application is 32- or 64- bits.
  2. Copy ${ROOT}/vogl_chroot/external/windows/pthreads.2/dll/${BITS}/pthreadVC2.dll to the directory that contains your executable.
  3. Set the following environment variable
    1. VOGL_CMD_LINE=-vogl_tracefile ${CAPTURE_LOCATION}\simpletrace.bin
Where CAPTURE_LOCATION is a suitable location, like C:\temp

Now simply run your application. You should wind up with a file at ${CAPTURE_LOCATION}\simpletrace.bin, which you can take to Linux to dump. 

This process will be radically simplified over the coming weeks. 

Todo

There's a ton of stuff left to do, but here's a list off the top of my head:
  • trace replay - single platform
    • What's better than dumping a trace to disk? Being able to actually replay it. 
    • This item would allow you to capture on windows and replay on windows.
  • trace replay - cross-platform
    • Longer term, we want to be able to take traces from one platform and replay them on other platforms.
  • vogltrace.exe
    • This will handle all of the injection into your process on your behalf. 
    • Linux doesn't need this, although it may benefit from such a system as well.
  • Code cleanup
    • Right now, the code is the least disruptive port it can possibly be. This means lots of code is copy-pasted from it's GLX friends. 
    • Longer term, we need to try and minimize the amount of code that is copy-pasted between platforms. 

Wednesday, April 23, 2014

Is this thing on?


This space reserved for future information regarding all things game development.