]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/vertexsetup_backend.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / backends / opengl / vertexsetup_backend.h
diff --git a/source/backends/opengl/vertexsetup_backend.h b/source/backends/opengl/vertexsetup_backend.h
new file mode 100644 (file)
index 0000000..954dcc7
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef MSP_GL_VERTEXSETUP_BACKEND_H_
+#define MSP_GL_VERTEXSETUP_BACKEND_H_
+
+namespace Msp {
+namespace GL {
+
+class VertexArray;
+class VertexFormat;
+
+class OpenGLVertexSetup
+{
+       friend class OpenGLPipelineState;
+
+protected:
+       unsigned id;
+
+       OpenGLVertexSetup();
+       ~OpenGLVertexSetup();
+
+       static void require_format(const VertexFormat &, bool);
+       void update(unsigned) const;
+       void update_vertex_array(const VertexArray &, unsigned, unsigned, bool) const;
+
+       void unload();
+
+       void set_debug_name(const std::string &);
+};
+
+using VertexSetupBackend = OpenGLVertexSetup;
+
+} // namespace GL
+} // namespace Msp
+
+#endif