-#include <msp/core/raii.h>
#include <msp/gl/extensions/arb_direct_state_access.h>
#include <msp/gl/extensions/arb_texture_storage.h>
+#include <msp/gl/extensions/arb_vertex_buffer_object.h>
#include <msp/graphics/imageloader.h>
#include "buffer.h"
#include "error.h"
allocated |= 1<<level;
}
-void Texture2D::image(unsigned level, PixelComponents comp, DataType type, const void *data)
-{
- if(comp!=get_components(format) || type!=get_component_type(format))
- throw incompatible_data("Texture2D::image");
- image(level, data);
-}
-
void Texture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht, const void *data)
{
if(width==0 || height==0)
}
}
-void Texture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht, PixelComponents comp, DataType type, const void *data)
-{
- if(comp!=get_components(format) || type!=get_component_type(format))
- throw incompatible_data("Texture2D::sub_image");
- sub_image(level, x, y, wd, ht, data);
-}
-
void Texture2D::image(const Graphics::Image &img, unsigned lv)
{
image(img, lv, false);