Skip to content

File Buffers.h

File List > render > Buffers.h

Go to the documentation of this file

#pragma once

#include <GL/glew.h>

class Buffers
{
protected:
    GLuint buf_ID   = 0; 
    GLuint buf_size = 0; 

    void _delBuffer();

    void _deepCopyFrom(const Buffers& src);

public:
    Buffers() = default;

    ~Buffers();

    Buffers(const Buffers& buf);

    Buffers(Buffers&& buf) noexcept;

    Buffers& operator=(const Buffers& buf);

    Buffers& operator=(Buffers&& buf) noexcept;

    GLuint GetID()   const { return buf_ID; }

    GLuint GetSize() const { return buf_size; }
};