From: José Fonseca Date: Sun, 8 Jul 2012 12:16:48 +0000 (+0100) Subject: Fix build. Add copyright header to new files. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=df347e7f014639233bd1494a7cac87c1adb6bd2c;p=apitrace Fix build. Add copyright header to new files. --- diff --git a/wrappers/gltrace_state.cpp b/wrappers/gltrace_state.cpp index 6bd20c0..796d61f 100644 --- a/wrappers/gltrace_state.cpp +++ b/wrappers/gltrace_state.cpp @@ -1,8 +1,38 @@ -#include -#include +/********************************************************************* + * + * Copyright 2012 Intel Corporation + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *********************************************************************/ + #include + +#include #include +#include +#include + namespace gltrace { typedef std::tr1::shared_ptr context_ptr_t; diff --git a/wrappers/wgltrace.py b/wrappers/wgltrace.py index f7625c6..52fd051 100644 --- a/wrappers/wgltrace.py +++ b/wrappers/wgltrace.py @@ -55,12 +55,12 @@ class WglTracer(GlTracer): print ' }' if function.name == 'wglDeleteContext': - print ' gltrace::Context *current_ctx = gltrace::getContext();' # Unlike other GL APIs like EGL or GLX, WGL will make the context # inactive if it's currently the active context. - print ' if (current_ctx == (uintptr_t)hglrc)' + print ' if (_wglGetCurrentContext() == hglrc) {' print ' gltrace::clearContext();' - print ' gltrace::destroyContext((uintptr_t)ctx);' + print ' }' + print ' gltrace::destroyContext((uintptr_t)hglrc);' if __name__ == '__main__':