Loading...
Searching...
No Matches
Texture.h
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.
70CSFML_GRAPHICS_API sfTexture* sfTexture_createFromFile(const char* filename, const sfIntRect* area);
93CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromFile(const char* filename, const sfIntRect* area);
105CSFML_GRAPHICS_API sfTexture* sfTexture_createFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
117CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
128CSFML_GRAPHICS_API sfTexture* sfTexture_createFromStream(sfInputStream* stream, const sfIntRect* area);
139CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromStream(sfInputStream* stream, const sfIntRect* area);
150CSFML_GRAPHICS_API sfTexture* sfTexture_createFromImage(const sfImage* image, const sfIntRect* area);
161CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromImage(const sfImage* image, const sfIntRect* area);
210CSFML_GRAPHICS_API void sfTexture_updateFromPixels(sfTexture* texture, const uint8_t* pixels, sfVector2u size, sfVector2u offset);
227CSFML_GRAPHICS_API void sfTexture_updateFromTexture(sfTexture* destination, const sfTexture* source, sfVector2u offset);
237CSFML_GRAPHICS_API void sfTexture_updateFromImage(sfTexture* texture, const sfImage* image, sfVector2u offset);
247CSFML_GRAPHICS_API void sfTexture_updateFromWindow(sfTexture* texture, const sfWindow* window, sfVector2u offset);
257CSFML_GRAPHICS_API void sfTexture_updateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, sfVector2u offset);
sfCoordinateType
Types of texture coordinates that can be used for rendering.
Definition CoordinateType.h:32
sfTexture * sfTexture_createSrgbFromImage(const sfImage *image, const sfIntRect *area)
Create a new sRGB-enabled texture from an image.
void sfTexture_updateFromImage(sfTexture *texture, const sfImage *image, sfVector2u offset)
Update a texture from an image.
unsigned int sfTexture_getNativeHandle(const sfTexture *texture)
Get the underlying OpenGL handle of the texture.
void sfTexture_updateFromPixels(sfTexture *texture, const uint8_t *pixels, sfVector2u size, sfVector2u offset)
Update a texture from an array of pixels.
void sfTexture_swap(sfTexture *left, sfTexture *right)
Swap the contents of a texture with those of another.
void sfTexture_setRepeated(sfTexture *texture, bool repeated)
Enable or disable repeating for a texture.
sfTexture * sfTexture_createSrgbFromFile(const char *filename, const sfIntRect *area)
Create a new sRGB-enabled texture from a file.
void sfTexture_updateFromWindow(sfTexture *texture, const sfWindow *window, sfVector2u offset)
Update a texture from the contents of a window.
sfImage * sfTexture_copyToImage(const sfTexture *texture)
Copy a texture's pixels to an image.
bool sfTexture_isSmooth(const sfTexture *texture)
Tell whether the smooth filter is enabled or not for a texture.
sfTexture * sfTexture_createFromStream(sfInputStream *stream, const sfIntRect *area)
Create a new texture from a custom stream.
bool sfTexture_isSrgb(const sfTexture *texture)
Tell whether the texture source is converted from sRGB or not.
void sfTexture_setSmooth(sfTexture *texture, bool smooth)
Enable or disable the smooth filter on a texture.
bool sfTexture_isRepeated(const sfTexture *texture)
Tell whether a texture is repeated or not.
sfVector2u sfTexture_getSize(const sfTexture *texture)
Return the size of the texture.
void sfTexture_updateFromRenderWindow(sfTexture *texture, const sfRenderWindow *renderWindow, sfVector2u offset)
Update a texture from the contents of a render-window.
bool sfTexture_generateMipmap(sfTexture *texture)
Generate a mipmap using the current texture data.
sfTexture * sfTexture_createFromImage(const sfImage *image, const sfIntRect *area)
Create a new texture from an image.
sfTexture * sfTexture_createFromFile(const char *filename, const sfIntRect *area)
Create a new texture from a file.
void sfTexture_bind(const sfTexture *texture, sfCoordinateType type)
Bind a texture for rendering.
unsigned int sfTexture_getMaximumSize(void)
Get the maximum texture size allowed.
sfTexture * sfTexture_createSrgbFromStream(sfInputStream *stream, const sfIntRect *area)
Create a new sRGB-enabled texture from a custom stream.
void sfTexture_updateFromTexture(sfTexture *destination, const sfTexture *source, sfVector2u offset)
Update a part of this texture from another texture.
sfTexture * sfTexture_createFromMemory(const void *data, size_t sizeInBytes, const sfIntRect *area)
Create a new texture from a file in memory.
sfTexture * sfTexture_createSrgb(sfVector2u size)
Create a new sRGB-enabled texture.
sfTexture * sfTexture_createSrgbFromMemory(const void *data, size_t sizeInBytes, const sfIntRect *area)
Create a new sRGB-enabled texture from a file in memory.
Set of callbacks that allow users to define custom file streams.
Definition InputStream.h:46