]> git.sesse.net Git - movit/blobdiff - util.cpp
Keep FBOs around in EffectChain again.
[movit] / util.cpp
index 310e7be7f6627bf58fc5f5556712eafab4a3fa3f..1e66c30b573e51ef419146d5149c32ed9e53e7d3 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -9,6 +9,14 @@
 #include "init.h"
 #include "util.h"
 
+#if defined(__DARWIN__)
+#include <OpenGL/OpenGL.h>
+#elif defined(WIN32)
+#include <GL/wglew.h>
+#else
+#include <GL/glxew.h>
+#endif
+
 using namespace std;
 
 namespace movit {
@@ -233,4 +241,15 @@ unsigned next_power_of_two(unsigned v)
        return v;
 }
 
+void *get_gl_context_identifier()
+{
+#if defined(__DARWIN__)
+       return (void *)CGLGetCurrentContext();
+#elif defined(WIN32)
+       return (void *)wglGetCurrentContext();
+#else
+       return (void *)glXGetCurrentContext();
+#endif
+}
+
 }  // namespace movit