Default constructor * Creates an empty texture.
Destructor.
Copy the texture pixels to an image. * This function performs a slow operation that downloads the texture's pixels from the graphics card and copies them to a new image, potentially applying transformations to pixels if necessary (texture may be padded or flipped). *
Create the texture. * If this function fails, the texture is left unchanged. *
Return the size of the texture. *
Tell whether the texture is repeated or not. *
Tell whether the smooth filter is enabled or not. *
Load the texture from a file on disk. * The area argument can be used to load only a sub-rectangle of the whole image. If you want the entire image then leave the default value (which is an empty IntRect). If the area rectangle crosses the bounds of the image, it is adjusted to fit the image size. * The maximum size for a texture depends on the graphics driver and can be retrieved with the getMaximumSize function. * If this function fails, the texture is left unchanged. *
Load the texture from an image. * The area argument can be used to load only a sub-rectangle of the whole image. If you want the entire image then leave the default value (which is an empty IntRect). If the area rectangle crosses the bounds of the image, it is adjusted to fit the image size. * The maximum size for a texture depends on the graphics driver and can be retrieved with the getMaximumSize function. * If this function fails, the texture is left unchanged. *
Load the texture from a file in memory. * The area argument can be used to load only a sub-rectangle of the whole image. If you want the entire image then leave the default value (which is an empty IntRect). If the area rectangle crosses the bounds of the image, it is adjusted to fit the image size. * The maximum size for a texture depends on the graphics driver and can be retrieved with the getMaximumSize function. * If this function fails, the texture is left unchanged. *
Load the texture from a custom stream. * The area argument can be used to load only a sub-rectangle of the whole image. If you want the entire image then leave the default value (which is an empty IntRect). If the area rectangle crosses the bounds of the image, it is adjusted to fit the image size. * The maximum size for a texture depends on the graphics driver and can be retrieved with the getMaximumSize function. * If this function fails, the texture is left unchanged. *
Enable or disable repeating. * Repeating is involved when using texture coordinates outside the texture rectangle [0, 0, width, height]. In this case, if repeat mode is enabled, the whole texture will be repeated as many times as needed to reach the coordinate (for example, if the X texture coordinate is 3 * width, the texture will be repeated 3 times). * If repeat mode is disabled, the "extra space" will instead be filled with border pixels. Warning: on very old graphics cards, white pixels may appear when the texture is repeated. With such cards, repeat mode can be used reliably only if the texture has power-of-two dimensions (such as 256x128). Repeating is disabled by default. *
Enable or disable the smooth filter. * When the filter is activated, the texture appears smoother so that pixels are less noticeable. However if you want the texture to look exactly the same as its source file, you should leave it disabled. The smooth filter is disabled by default. *
Update the whole texture from an array of pixels. * The pixel array is assumed to have the same size as the area rectangle, and to contain 32-bits RGBA pixels. * No additional check is performed on the size of the pixel array, passing invalid arguments will lead to an undefined behavior. * This function does nothing if pixels is empty or if the texture was not previously created. *
Update part of the texture from an array of pixels. * The size of the pixel array must match the width and height arguments, and it must contain 32-bits RGBA pixels. * No additional check is performed on the size of the pixel array or the bounds of the area to update, passing invalid arguments will lead to an undefined behaviour. * This function does nothing if pixels is empty or if the texture was not previously created. *
Update the texture from an image. * Although the source image can be smaller than the texture, this function is usually used for updating the whole texture. The other overload, which has (x, y) additional arguments, is more convenient for updating a sub-area of the texture. * No additional check is performed on the size of the image, passing an image bigger than the texture will lead to an undefined behaviour. * This function does nothing if the texture was not previously created. *
Update the texture from an image. * No additional check is performed on the size of the image, passing an invalid combination of image size and offset will lead to an undefined behavior. * This function does nothing if the texture was not previously created. *
Update the texture from the contents of a window * Although the source window can be smaller than the texture, this function is usually used for updating the whole texture. The other overload, which has (x, y) additional arguments, is more convenient for updating a sub-area of the texture. * No additional check is performed on the size of the window, passing a window bigger than the texture will lead to an undefined behavior. * This function does nothing if either the texture or the window was not previously created. *
Update a part of the texture from the contents of a window. * No additional check is performed on the size of the window, passing an invalid combination of window size and offset will lead to an undefined behavior. * This function does nothing if either the texture or the window was not previously created. *
Update the texture from an image. * Although the source image can be smaller than the texture, this function is usually used for updating the whole texture. The other overload, which has (x, y) additional arguments, is more convenient for updating a sub-area of the texture. * No additional check is performed on the size of the image, passing an image bigger than the texture will lead to an undefined behaviour. * This function does nothing if the texture was not previously created. *
Update part of the texture from an array of pixels. * The size of the pixel array must match the width and height arguments, and it must contain 32-bits RGBA pixels. * No additional check is performed on the size of the pixel array or the bounds of the area to update, passing invalid arguments will lead to an undefined behaviour. * This function does nothing if pixels is null or if the texture was not previously created. *
Update a part of the texture from the contents of a window. * No additional check is performed on the size of the window, passing an invalid combination of window size and offset will lead to an undefined behaviour. * This function does nothing if either the texture or the window was not previously created. *
Update a part of the texture from the contents of a window. * No additional check is performed on the size of the window, passing an invalid combination of window size and offset will lead to an undefined behaviour. * This function does nothing if either the texture or the window was not previously created. *
Creates a new texture from the same data (this means copying the entire set of pixels).
Bind a texture for rendering. * This function is not part of the graphics API, it mustn't be used when drawing DSFML entities. It must be used only if you mix Texture with OpenGL code. *
Get the maximum texture size allowed. * This Maximum size is defined by the graphics driver. You can expect a value of 512 pixels for low-end graphics card, and up to 8192 pixels or more for newer hardware. *
Image living on the graphics card that can be used for drawing.