Loading...
Searching...
No Matches
Texture.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
Base class for all render targets (window, texture, ...)
Definition RenderTarget.hpp:53
static unsigned int getMaximumSize()
Get the maximum texture size allowed.
void update(const Uint8 *pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y)
Update a part of the texture from an array of pixels.
void update(const Window &window, unsigned int x, unsigned int y)
Update a part of the texture from the contents of a window.
bool loadFromMemory(const void *data, std::size_t size, const IntRect &area=IntRect())
Load the texture from a file in memory.
unsigned int getNativeHandle() const
Get the underlying OpenGL handle of the texture.
bool loadFromStream(InputStream &stream, const IntRect &area=IntRect())
Load the texture from a custom stream.
void update(const Image &image, unsigned int x, unsigned int y)
Update a part of the texture from an image.
void update(const Texture &texture, unsigned int x, unsigned int y)
Update a part of this texture from another texture.
bool loadFromFile(const std::string &filename, const IntRect &area=IntRect())
Load the texture from a file on disk.
bool isSrgb() const
Tell whether the texture source is converted from sRGB or not.
bool loadFromImage(const Image &image, const IntRect &area=IntRect())
Load the texture from an image.
void update(const Window &window)
Update the texture from the contents of a window.
void update(const Uint8 *pixels)
Update the whole texture from an array of pixels.
static void bind(const Texture *texture, CoordinateType coordinateType=Normalized)
Bind a texture for rendering.
void update(const Texture &texture)
Update a part of this texture from another texture.
Definition AlResource.hpp:35