From: Mikko Rasa Date: Sun, 7 Feb 2021 13:24:59 +0000 (+0200) Subject: Graphics::Image::get_data was renamed to get_pixels X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=71ca61440610e650c6c1b761ebee1b587bbc969e;p=libs%2Fgl.git Graphics::Image::get_data was renamed to get_pixels --- diff --git a/source/texture1d.cpp b/source/texture1d.cpp index 592e4d77..742857be 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -131,7 +131,7 @@ void Texture1D::image(const Graphics::Image &img, unsigned lv) else if(w!=width) throw incompatible_data("Texture1D::image"); - image(0, img.get_data()); + image(0, img.get_pixels()); } unsigned Texture1D::get_n_levels() const diff --git a/source/texture2d.cpp b/source/texture2d.cpp index cee932f7..311a3e45 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -165,7 +165,7 @@ void Texture2D::image(const Graphics::Image &img, unsigned lv, bool from_buffer) PixelStore pstore = PixelStore::from_image(img); BindRestore _bind_ps(pstore); - image(0, from_buffer ? 0 : img.get_data()); + image(0, from_buffer ? 0 : img.get_pixels()); } unsigned Texture2D::get_n_levels() const @@ -270,7 +270,7 @@ bool Texture2D::AsyncLoader::process() } else if(phase==2) { - const char *data = reinterpret_cast(image.get_data()); + const char *data = reinterpret_cast(image.get_pixels()); copy(data, data+n_bytes, mapped_address); } else if(phase==3) diff --git a/source/texture2darray.cpp b/source/texture2darray.cpp index 4d37263c..1ecb4cf2 100644 --- a/source/texture2darray.cpp +++ b/source/texture2darray.cpp @@ -48,7 +48,7 @@ void Texture2DArray::layer_image(unsigned level, unsigned z, const Graphics::Ima PixelStore pstore = PixelStore::from_image(img); BindRestore _bind_ps(pstore); - layer_image(level, z, img.get_data()); + layer_image(level, z, img.get_pixels()); } diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 1f62e050..03c58d0a 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -157,7 +157,7 @@ void Texture3D::image(const Graphics::Image &img, unsigned lv) PixelStore pstore = PixelStore::from_image(img); BindRestore _bind_ps(pstore); - image(0, img.get_data()); + image(0, img.get_pixels()); } unsigned Texture3D::get_n_levels() const diff --git a/source/texturecube.cpp b/source/texturecube.cpp index 9ea33eab..6ec36625 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -183,7 +183,7 @@ void TextureCube::image(TextureCubeFace face, const Graphics::Image &img) PixelStore pstore = PixelStore::from_image(img); BindRestore _bind_ps(pstore); - image(face, 0, img.get_data()); + image(face, 0, img.get_pixels()); } void TextureCube::image(TextureCubeFace face, const Graphics::Image &img, bool) @@ -209,10 +209,10 @@ void TextureCube::image(const Graphics::Image &img, unsigned lv) PixelStore pstore = PixelStore::from_image(img); BindRestore _bind_ps(pstore); - const char *cdata = reinterpret_cast(img.get_data()); + const char *pixels = reinterpret_cast(img.get_pixels()); unsigned face_size = img.get_stride()*size; for(unsigned i=0; i<6; ++i) - image(enumerate_faces(i), 0, cdata+i*face_size); + image(enumerate_faces(i), 0, pixels+i*face_size); } unsigned TextureCube::get_n_levels() const