ProgramData no longer manipulates GL directly, and it's used in places
like Renderer and Material. This changes allows those things to be used
without shader support.
-#include <msp/gl/extensions/arb_shader_objects.h>
#include "buffer.h"
#include "color.h"
#include "error.h"
last_block(0),
buffer(0),
changes(NO_CHANGES)
-{
- static Require _req(ARB_shader_objects);
-}
+{ }
// Blocks are intentionally left uncopied
ProgramData::ProgramData(const ProgramData &other):
#include <stdexcept>
+#include <msp/gl/extensions/arb_shader_objects.h>
+#include <msp/gl/extensions/arb_uniform_buffer_object.h>
#include "buffer.h"
#include "color.h"
#include "error.h"
UniformBlock::UniformBlock():
buf_range(0)
-{ }
+{
+ static Require _req(ARB_shader_objects);
+}
UniformBlock::UniformBlock(unsigned s):
size(s),
data(size),
buf_range(0)
-{ }
+{
+ static Require _req(ARB_uniform_buffer_object);
+}
UniformBlock::~UniformBlock()
{