From 01649d42f68c09f377741113ccd139116cb243e8 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 2 Apr 2016 17:30:44 -1000 Subject: [PATCH] Windows fixes --- include/boo/ThreadLocalPtr.hpp | 4 ++-- lib/graphicsdev/GL.cpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/boo/ThreadLocalPtr.hpp b/include/boo/ThreadLocalPtr.hpp index bb2a20b..cde872b 100644 --- a/include/boo/ThreadLocalPtr.hpp +++ b/include/boo/ThreadLocalPtr.hpp @@ -15,8 +15,8 @@ class ThreadLocalPtr public: ThreadLocalPtr() {m_key = TlsAlloc();} ~ThreadLocalPtr() {TlsFree(m_key);} - T* get() {return static_cast(TlsGetValue(m_key));} - void reset(T* v=nullptr) {TlsSetValue(m_key, v);} + T* get() const {return static_cast(TlsGetValue(m_key));} + void reset(T* v=nullptr) {TlsSetValue(m_key, LPVOID(v));} #else pthread_key_t m_key; public: diff --git a/lib/graphicsdev/GL.cpp b/lib/graphicsdev/GL.cpp index c4252a6..4729651 100644 --- a/lib/graphicsdev/GL.cpp +++ b/lib/graphicsdev/GL.cpp @@ -320,7 +320,7 @@ GLDataFactory::Context::newStaticArrayTexture(size_t width, size_t height, size_ class GLShaderPipeline : public IShaderPipeline { friend class GLDataFactory; - friend class GLCommandQueue; + friend struct GLCommandQueue; friend struct GLShaderDataBinding; GLuint m_vert = 0; GLuint m_frag = 0; @@ -992,12 +992,10 @@ struct GLCommandQueue : IGraphicsCommandQueue glClearColor(cmd.rgba[0], cmd.rgba[1], cmd.rgba[2], cmd.rgba[3]); break; case Command::Op::ClearTarget: - { if (cmd.flags & GL_DEPTH_BUFFER_BIT) glDepthMask(GL_TRUE); glClear(cmd.flags); break; - } case Command::Op::Draw: glDrawArrays(currentPrim, cmd.start, cmd.count); break;