#ifndef MSP_GL_BUFFER_H_
#define MSP_GL_BUFFER_H_
+#include <stdexcept>
+#include <string>
#include <vector>
#include "gl.h"
#include <msp/gl/extensions/arb_pixel_buffer_object.h>
namespace Msp {
namespace GL {
+class buffer_too_small: public std::logic_error
+{
+public:
+ buffer_too_small(const std::string &w): std::logic_error(w) { }
+ virtual ~buffer_too_small() throw() { }
+};
+
enum BufferType
{
ARRAY_BUFFER = GL_ARRAY_BUFFER,
unsigned get_size() const { return size; }
+ void require_size(unsigned) const;
+
BufferRange *create_range(unsigned, unsigned);
void *map(BufferAccess);