glGenVertexArrays(1, &id);
}
+OpenGLVertexSetup::OpenGLVertexSetup(OpenGLVertexSetup &&other):
+ id(other.id)
+{
+ other.id = 0;
+}
+
OpenGLVertexSetup::~OpenGLVertexSetup()
{
- glDeleteVertexArrays(1, &id);
+ if(id)
+ glDeleteVertexArrays(1, &id);
}
void OpenGLVertexSetup::require_format(const VertexFormat &fmt, bool instanced)