]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/buffer.h
Use a scratch binding to modify textures and buffers
[libs/gl.git] / source / core / buffer.h
index a80e52a68b9c34b00e499c6a16fb0b9e85446d39..ca9a595555869668adbf9a56f910b305ee37bae9 100644 (file)
@@ -57,6 +57,8 @@ private:
        unsigned size;
        bool allocated;
 
+       static Buffer *scratch_binding;
+
 public:
        Buffer();
        ~Buffer();
@@ -96,6 +98,11 @@ public:
        bool unmap();
 
        void set_debug_name(const std::string &);
+
+private:
+       void bind_scratch();
+public:
+       static void unbind_scratch();
 };
 
 } // namespace GL