* Write snapshots as PNGs instead of BMPs
* Add new mode to compare with previous snapshots instead of writing.
+
+* Plug memory leaks.
*
**************************************************************************/
+/*
+ * BMP image writing.
+ */
+
#ifndef _BMP_HPP_
#define _BMP_HPP_
##########################################################################/
+"""C code generation helpers."""
+
+
def _string_switch(var, prefix, suffixes, case, default):
index = len(prefix)
indent = ' '*(index + 1)
def string_switch(var, values, case=_noop, default=None):
+ """Product a switch of strings, using a tree character switches."""
values = list(values)
values.sort()
_string_switch(var, '', values, case, default)
*
**************************************************************************/
+/*
+ * MinGW compatability macros to allow using recent's DXSDK headers.
+ */
+
#ifdef __MINGW32__
#define __in /**/
#define __out /**/
**************************************************************************/
+/*
+ * Simple utility to dump a trace to standard output.
+ */
+
+
#include "trace_parser.hpp"
*
**************************************************************************/
+/*
+ * Helpers for coloring output.
+ */
+
#ifndef _FORMATTER_HPP_
#define _FORMATTER_HPP_
##########################################################################/
+"""GL API description.
+
+Most of these were automatically generated with the apigen/glspec.py script
+from Khronos OpenGL spec files, and then manually edited to cover the corner
+cases correctly.
+
+"""
+
+
from stdapi import *
from glenum import *
##########################################################################/
+"""GLenum description.
+
+This was semi-automatically generated from glext headers, with vim. An
+automated procedure to generate it would be nice.
+
+"""
+
+
from stdapi import *
*
**************************************************************************/
+/*
+ * Central place for all GL includes, and respective OS dependent headers.
+ */
+
#ifndef _GLIMPORTS_HPP_
#define _GLIMPORTS_HPP_
##########################################################################/
+"""Generated an header, glproc.hpp, which does pretty much what GLEW does, but
+covers all the functions we support.
+"""
+
+
import stdapi
from glapi import glapi
from glxapi import glxapi
##########################################################################/
+"""GL retracer generator."""
+
+
import stdapi
import glapi
from retrace import Retracer
*
**************************************************************************/
+/*
+ * Auxiliary functions to compute the size of array/blob arguments, depending.
+ *
+ * Some of these functions were semi-automatically generated with
+ * apigen/glsize.py script from Mesa's XML description of the GL enums.
+ *
+ * Other functions were done by hand.
+ */
+
#ifndef _GL_HELPERS_HPP_
#define _GL_HELPERS_HPP_
#
##########################################################################/
+"""GLX API description."""
+
from stdapi import *
from glapi import glapi
glxapi.add_functions(glapi.functions)
glxapi.add_functions([
Function(GLXContext, "glXCreateContext", [(Display, "dpy"), (Pointer(XVisualInfo), "vis"), (GLXContext, "shareList"), (Bool_, "direct")]),
+ # TODO: the rest
+ # Must be last
Function(PROC, "glXGetProcAddressARB", [(Alias("const GLubyte *", CString), "procName")]),
Function(PROC, "glXGetProcAddress", [(Alias("const GLubyte *", CString), "procName")]),
])
##########################################################################/
+"""GLX tracing generator."""
+
+
from glxapi import glxapi
from trace import Tracer
*
**************************************************************************/
+/*
+ * Simple OS abstraction layer.
+ */
+
#ifndef _OS_HPP_
#define _OS_HPP_
##########################################################################/
+"""Generic retracing code generator."""
+
import stdapi
import glapi
from codegen import *
*
**************************************************************************/
+/*
+ * Binary trace format decription.
+ */
+
#ifndef _TRACE_FORMAT_HPP_
#define _TRACE_FORMAT_HPP_
};
/*
+ * XXX: Update grammar.
+ *
* trace = call* EOF
*
* call = name (detail)* END
*
**************************************************************************/
+/*
+ * Object hierarchy for describing the traces in memory.
+ */
+
#ifndef _TRACE_MODEL_HPP_
#define _TRACE_MODEL_HPP_
*
**************************************************************************/
+/*
+ * Trace writing functions.
+ */
+
#ifndef _TRACE_WRITE_HPP_
#define _TRACE_WRITE_HPP_
##########################################################################/
+"""WGL API description"""
+
+
from glapi import *
from winapi import *
##########################################################################/
+"""WGL tracing code generator."""
+
+
from wglapi import wglapi
from trace import Tracer
from codegen import *