]> git.sesse.net Git - nageru/blobdiff - mixer.h
Fix a compile error related to gl.h choices.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index ef7701fc2e781b6306f5047e07e07c40e55c9432..8bd023d68bf1e94ede59a5f0909f3e528daccf28 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -1,2 +1,19 @@
+#ifndef _MIXER_H
+#define _MIXER_H 1
+
+#include "ref_counted_gl_sync.h"
+
 class QSurface;
-void mixer_thread(QSurface *surface, QSurface *surface2, QSurface *surface3, QSurface *surface4);
+void start_mixer(QSurface *surface, QSurface *surface2, QSurface *surface3, QSurface *surface4);
+void mixer_quit();
+
+struct DisplayFrame {
+       GLuint texnum;
+       RefCountedGLsync ready_fence;  // Asserted when the texture is done rendering.
+};
+bool mixer_get_display_frame(DisplayFrame *frame);  // Implicitly frees the previous one if there's a new frame available.
+
+typedef std::function<void()> new_frame_ready_callback_t;
+void set_frame_ready_fallback(new_frame_ready_callback_t callback);
+
+#endif  // !defined(_MIXER_H)