]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/bufferable.cpp
Remove some unused and unnecessary things
[libs/gl.git] / source / core / bufferable.cpp
index 8f967df7a89967cf0d83ece6778d6a6ed3640539..0a480e2527cfabbdf24241508d089acb5e8bd726 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdexcept>
 #include "buffer.h"
 #include "bufferable.h"
+#include "error.h"
 
 using namespace std;
 
@@ -106,11 +107,13 @@ void Bufferable::update_offset()
 
 void Bufferable::upload_data(char *target) const
 {
+       if(!buffer)
+               throw invalid_operation("Bufferable::upload_data");
+
        unsigned data_size = get_data_size();
        if(location_dirty)
        {
                buffer->require_size(offset+data_size);
-               location_changed(buffer, offset, data_size);
                location_dirty = false;
        }