35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
217 void update(
const uint8_t *data);
236 void update(
const uint8_t *data,
const RectU& rect);
287 bool create(Vector2u size,
const uint8_t *data);
357 bool create(Vector2u size);
492 bool create(Vector2u size);
495 #ifndef DOXYGEN_SHOULD_SKIP_THIS
static void bind(const BareTexture *texture)
Bind a texture for rendering.
void update(const Image &image)
Update the texture from an image.
Vector2u getSize() const
Return the size of the texture.
Definition: Texture.h:138
BareTexture & operator=(const BareTexture &)=delete
Deleted copy assignment.
bool create(Vector2u size)
Create the texture.
void update(const uint8_t *data, const RectU &rect)
Update a part of the texture from an array of pixels.
bool loadFromFile(const Path &filename)
Load the texture from a file on disk.
bool create(Vector2u size)
Create the texture.
Image copyToImage() const
Copy the texture pixels to an image.
bool isRepeated() const noexcept
Check if the texture is repeated or not.
Definition: Texture.h:197
bool create(Vector2u size, const uint8_t *data)
Create the texture.
unsigned getName() const
Get the internal representation of the texture.
Definition: Texture.h:129
~BareTexture()
Destructor.
BareTexture & operator=(BareTexture &&other)
Move assignment.
bool loadFromImage(const Image &image)
Load the texture from an image.
A texture for colored images.
Definition: Texture.h:339
bool isSmooth() const noexcept
Check if the smooth filter is enabled or not.
Definition: Texture.h:165
BareTexture(BareTexture &&other)
Move constructor.
BareTexture(const BareTexture &)=delete
Deleted copy constructor.
void setSmooth(bool smooth=true)
Enable or disable the smooth filter.
Class for loading, manipulating and saving images.
Definition: Image.h:92
An image that lives in the graphic memory that can be used for drawing.
Definition: Texture.h:67
bool loadFromMemory(const uint8_t *data, std::size_t length)
Load the texture from a file in memory.
AlphaTexture()
Constructor.
BareTexture(Format format)
Constructor.
Format
Format of the texture.
Definition: Texture.h:74
Format getFormat() const
Get the format of the texture.
Definition: Texture.h:118
RectF computeTextureCoords(const RectU &rect) const
Compute normalized texture coordinates.
bool loadFromStream(InputStream &stream)
Load the texture from a custom stream.
A texture with a single alpha channel.
Definition: Texture.h:474
#define GF_API
Definition: Portability.h:35
void update(const uint8_t *data)
Update the whole texture from an array of pixels.
bool generateMipmap()
Generate a mipmap using the current texture data.
void setRepeated(bool repeated=true)
Enable or disable repeating.