}
}
+void Texture1D::sub_image(unsigned level, int x, unsigned wd, PixelFormat fmt, DataType type, const void *data)
+{
+ if(width==0)
+ throw invalid_operation("Texture3D::image");
+
+ allocate(level);
+
+ BindRestore _bind(this);
+ glTexSubImage1D(target, level, x, wd, fmt, type, data);
+}
+
void Texture1D::image(const Graphics::Image &img, bool srgb)
{
if(img.get_height()!=1)
void storage(PixelFormat, unsigned);
void allocate(unsigned);
void image(unsigned, PixelFormat, DataType, const void *);
+ void sub_image(unsigned, int, unsigned, PixelFormat, DataType, const void *);
virtual void image(const Graphics::Image &, bool = false);
unsigned get_width() const { return width; }