]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/commands_backend.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / backends / opengl / commands_backend.h
diff --git a/source/backends/opengl/commands_backend.h b/source/backends/opengl/commands_backend.h
new file mode 100644 (file)
index 0000000..f54b27a
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef MSP_GL_COMMANDS_BACKEND_H_
+#define MSP_GL_COMMANDS_BACKEND_H_
+
+namespace Msp {
+namespace GL {
+
+class Batch;
+union ClearValue;
+class Framebuffer;
+class PipelineState;
+class QueryPool;
+
+class OpenGLCommands
+{
+protected:
+       const PipelineState *pipeline_state;
+
+       OpenGLCommands();
+
+       void use_pipeline(const PipelineState *);
+       void clear(const ClearValue *);
+       void draw(const Batch &);
+       void draw_instanced(const Batch &, unsigned);
+       void resolve_multisample(Framebuffer &);
+
+       void begin_query(const QueryPool &, unsigned);
+       void end_query(const QueryPool &, unsigned);
+};
+
+using CommandsBackend = OpenGLCommands;
+
+} // namespace GL
+} // namespace Msp
+
+#endif
+