Copy the texture pixels to an image.
Create the texture.
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.
Load the texture from an image.
Load the texture from a file in memory.
Load the texture from a custom stream.
Enable or disable repeating.
Enable or disable the smooth filter.
Update the texture from an image.
Update part of the texture from an array of pixels.
Update a part of the texture from the contents of a window.
Update a part of the texture from the contents of a window.
Creates a new texture from the same data (this means copying the entire set of pixels).
Bind a texture for rendering.
Get the maximum texture size allowed.
Image living on the graphics card that can be used for drawing.
Texture stores pixels that can be drawn, with a sprite for example.
A texture lives in the graphics card memory, therefore it is very fast to draw a texture to a render target, or copy a render target to a texture (the graphics card can access both directly).
Being stored in the graphics card memory has some drawbacks. A texture cannot be manipulated as freely as a Image, you need to prepare the pixels first and then upload them to the texture in a single operation (see Texture::update).
Texture makes it easy to convert from/to Image, but keep in mind that these calls require transfers between the graphics card and the central memory, therefore they are slow operations.
A texture can be loaded from an image, but also directly from a file/memory/stream. The necessary shortcuts are defined so that you don't need an image first for the most common cases. However, if you want to perform some modifications on the pixels before creating the final texture, you can load your file to a Image, do whatever you need with the pixels, and then call Texture::loadFromImage.
Since they live in the graphics card memory, the pixels of a texture cannot be accessed without a slow copy first. And they cannot be accessed individually. Therefore, if you need to read the texture's pixels (like for pixel-perfect collisions), it is recommended to store the collision information separately, for example in an array of booleans.
Like Image, Texture can handle a unique internal representation of pixels, which is RGBA 32 bits. This means that a pixel must be composed of 8 bits red, green, blue and alpha channels – just like a Color.