-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <msp/io/memory.h>
void Texture2D::image(unsigned level, PixelFormat fmt, DataType type, const void *data)
{
void Texture2D::image(unsigned level, PixelFormat fmt, DataType type, const void *data)
{
void Texture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht, PixelFormat fmt, DataType type, const void *data)
{
void Texture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht, PixelFormat fmt, DataType type, const void *data)
{
image(0, fmt, UNSIGNED_BYTE, img.get_data());
}
image(0, fmt, UNSIGNED_BYTE, img.get_data());
}
{
add("image_data", &Loader::image_data);
add("raw_data", &Loader::raw_data);
{
add("image_data", &Loader::image_data);
add("raw_data", &Loader::raw_data);
- Texture2D &t2d = static_cast<Texture2D &>(obj);
- t2d.image(0, t2d.ifmt, UNSIGNED_BYTE, data.data());
+ obj.image(0, obj.ifmt, UNSIGNED_BYTE, data.data());
}
void Texture2D::Loader::storage_b(PixelFormat fmt, unsigned w, unsigned h, unsigned)
}
void Texture2D::Loader::storage_b(PixelFormat fmt, unsigned w, unsigned h, unsigned)