void Framebuffer::bind() const
{
+ if(attachments.empty())
+ throw invalid_operation("Framebuffer::bind");
+
if(set_current(this))
{
glBindFramebuffer(GL_FRAMEBUFFER, id);
#include <msp/gl/extensions/arb_vertex_buffer_object.h>
#include <msp/gl/extensions/arb_vertex_shader.h>
#include "buffer.h"
+#include "error.h"
#include "gl.h"
#include "vertexarray.h"
#include "vertexsetup.h"
void VertexSetup::bind() const
{
+ if(!vertex_array || !index_buffer)
+ throw invalid_operation("VertexSetup::bind");
+
if(set_current(this))
{
glBindVertexArray(id);