summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/gles2_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/client/gles2_lib.h')
-rw-r--r--gpu/command_buffer/client/gles2_lib.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/gpu/command_buffer/client/gles2_lib.h b/gpu/command_buffer/client/gles2_lib.h
index e2825fa..2242cc8 100644
--- a/gpu/command_buffer/client/gles2_lib.h
+++ b/gpu/command_buffer/client/gles2_lib.h
@@ -9,23 +9,19 @@
#include "gpu/command_buffer/client/gles2_implementation.h"
-#if defined(_MSC_VER)
-#define THREAD_LOCAL __declspec(thread)
-#else
-#define THREAD_LOCAL __thread
-#endif
-
namespace gles2 {
-extern THREAD_LOCAL gpu::gles2::GLES2Implementation* g_gl_impl;
+// Initialize the GLES2 library.
+void Initialize();
+
+// Terminate the GLES2 library.
+void Terminate();
-inline gpu::gles2::GLES2Implementation* GetGLContext() {
- return g_gl_impl;
-}
+// Get the current GL context.
+gpu::gles2::GLES2Implementation* GetGLContext();
-inline void SetGLContext(gpu::gles2::GLES2Implementation* impl) {
- g_gl_impl = impl;
-}
+// Set the current GL context.
+void SetGLContext(gpu::gles2::GLES2Implementation* impl);
} // namespace gles2