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.
69CSFML_GRAPHICS_API sfTexture* sfTexture_createFromFile(const char* filename, const sfIntRect* area);
92CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromFile(const char* filename, const sfIntRect* area);
104CSFML_GRAPHICS_API sfTexture* sfTexture_createFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
116CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
127CSFML_GRAPHICS_API sfTexture* sfTexture_createFromStream(sfInputStream* stream, const sfIntRect* area);
138CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromStream(sfInputStream* stream, const sfIntRect* area);
149CSFML_GRAPHICS_API sfTexture* sfTexture_createFromImage(const sfImage* image, const sfIntRect* area);
160CSFML_GRAPHICS_API sfTexture* sfTexture_createSrgbFromImage(const sfImage* image, const sfIntRect* area);
211CSFML_GRAPHICS_API void sfTexture_updateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
229CSFML_GRAPHICS_API void sfTexture_updateFromTexture(sfTexture* destination, const sfTexture* source, unsigned int x, unsigned int y);
240CSFML_GRAPHICS_API void sfTexture_updateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
251CSFML_GRAPHICS_API void sfTexture_updateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
262CSFML_GRAPHICS_API void sfTexture_updateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
sfTexture * sfTexture_createSrgbFromImage(const sfImage *image, const sfIntRect *area)
Create a new sRGB-enabled texture from an image.
unsigned int sfTexture_getNativeHandle(const sfTexture *texture)
Get the underlying OpenGL handle of the texture.
sfTexture * sfTexture_create(unsigned int width, unsigned int height)
Create a new texture.
void sfTexture_swap(sfTexture *left, sfTexture *right)
Swap the contents of a texture with those of another.
void sfTexture_setRepeated(sfTexture *texture, sfBool repeated)
Enable or disable repeating for a texture.
void sfTexture_updateFromImage(sfTexture *texture, const sfImage *image, unsigned int x, unsigned int y)
Update a texture from an image.
sfBool sfTexture_isSrgb(const sfTexture *texture)
Tell whether the texture source is converted from sRGB or not.
sfBool sfTexture_isSmooth(const sfTexture *texture)
Tell whether the smooth filter is enabled or not for a texture.
sfTexture * sfTexture_createSrgbFromFile(const char *filename, const sfIntRect *area)
Create a new sRGB-enabled texture from a file.
void sfTexture_updateFromTexture(sfTexture *destination, const sfTexture *source, unsigned int x, unsigned int y)
Update a part of this texture from another texture.
sfBool sfTexture_generateMipmap(sfTexture *texture)
Generate a mipmap using the current texture data.
void sfTexture_updateFromRenderWindow(sfTexture *texture, const sfRenderWindow *renderWindow, unsigned int x, unsigned int y)
Update a texture from the contents of a render-window.
sfImage * sfTexture_copyToImage(const sfTexture *texture)
Copy a texture's pixels to an image.
sfTexture * sfTexture_createFromStream(sfInputStream *stream, const sfIntRect *area)
Create a new texture from a custom stream.
void sfTexture_updateFromWindow(sfTexture *texture, const sfWindow *window, unsigned int x, unsigned int y)
Update a texture from the contents of a window.
void sfTexture_bind(const sfTexture *texture, sfTextureCoordinateType type)
Bind a texture for rendering.
sfBool 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.
sfTextureCoordinateType
Types of texture coordinates that can be used for rendering.
Definition Texture.h:44
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.
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_setSmooth(sfTexture *texture, sfBool smooth)
Enable or disable the smooth filter on a texture.
sfTexture * sfTexture_createFromMemory(const void *data, size_t sizeInBytes, const sfIntRect *area)
Create a new texture from a file in memory.
void sfTexture_updateFromPixels(sfTexture *texture, const sfUint8 *pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y)
Update a texture from an array of pixels.
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:45