#include <assert.h>
#include <stdint.h>
+#include "os_path.hpp"
#include "image.hpp"
#include "glproc.hpp"
#include "glsize.hpp"
-#if !defined(_WIN32) && !defined(__APPLE__)
+#if !defined(TRACE_EGL) && !defined(_WIN32) && !defined(__APPLE__)
#include <X11/Xproto.h>
*/
static image::Image *
getDrawableImage(void) {
-#if defined(_WIN32)
+#if defined(TRACE_EGL)
+
+ // TODO
+ return NULL;
+
+#elif defined(_WIN32)
HDC hDC = __wglGetCurrentDC();
if (!hDC) {
if (snapshot_prefix) {
image::Image *src = getDrawableImage();
if (src) {
- char filename[PATH_MAX];
- snprintf(filename, sizeof filename, "%s%010u.png", snapshot_prefix, call_no);
+ os::Path filename = os::Path::format("%s%010u.png", snapshot_prefix, call_no);
if (src->writePNG(filename)) {
- os::log("apitrace: wrote %s\n", filename);
+ os::log("apitrace: wrote %s\n", filename.str());
}
delete src;