]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.cpp
Rework exceptions
[libs/gl.git] / source / renderpass.cpp
index b95bd4bcfe1977c9ce327c0e5189883efd97800a..93538d48d64e013f948c33cee22eee989adc0c3b 100644 (file)
@@ -1,13 +1,7 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007-2008, 2010-2011  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include <msp/core/refptr.h>
 #include <msp/datafile/collection.h>
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
+#include "error.h"
 #include "material.h"
 #include "renderpass.h"
 #include "program.h"
@@ -120,7 +114,7 @@ void RenderPass::Loader::texunit_named(unsigned i, const string &n)
 void RenderPass::Loader::uniforms()
 {
        if(!obj.shprog)
-               throw InvalidState("Can't load uniforms without a shader program");
+               throw invalid_operation("RenderPass::Loader::uniforms");
        if(!obj.shdata)
                obj.shdata = new ProgramData(*obj.shprog);
        load_sub(*obj.shdata);
@@ -150,7 +144,7 @@ void RenderPass::TextureLoader::finish()
 
 void RenderPass::TextureLoader::texenv()
 {
-       throw Exception("TexEnvs can't be loaded yet");
+       throw runtime_error("TexEnvs can't be loaded yet");
        /*env = new TexEnv;
        load_sub(*env);*/
 }