-#include "except.h"
+#include <msp/strings/format.h>
+#include "error.h"
#include "texture.h"
#include "texunit.h"
else if(c.get()=="MIRRORED_REPEAT")
tw = MIRRORED_REPEAT;
else
- throw LexicalError("Invalid input in TextureWrap conversion");
+ throw lexical_error(format("conversion of '%s' to TextureWrap", c.get()));
}
void Texture::bind() const
{
- if(!target)
- throw InvalidState("Attempt to bind a texture without target (should never happen)");
-
const Texture *cur = TexUnit::current().get_texture();
if(cur!=this)
{