]> git.cworth.org Git - apitrace/commitdiff
Fix build. Add copyright header to new files.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 8 Jul 2012 12:16:48 +0000 (13:16 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 8 Jul 2012 12:16:48 +0000 (13:16 +0100)
wrappers/gltrace_state.cpp
wrappers/wgltrace.py

index 6bd20c0f84e0ce3b0280ac7cf68a367ed55fb017..796d61f37399a3060651493d79f6c48fb7b9ef99 100644 (file)
@@ -1,8 +1,38 @@
-#include <gltrace.hpp>
-#include <os_thread.hpp>
+/*********************************************************************
+ *
+ * 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 <assert.h>
+
+#include <map>
 #include <tr1/memory>
 
+#include <gltrace.hpp>
+#include <os_thread.hpp>
+
 namespace gltrace {
 
 typedef std::tr1::shared_ptr<Context> context_ptr_t;
index f7625c6d895622a98d4470f4d35f1aac01376d7e..52fd05182f62c3a664d68b378b4ea360591ceaad 100644 (file)
@@ -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__':