Encapsulation of the raylib texture NOTE: These functions require GPU access.
More...
#include <RlTexture.hpp>
Encapsulation of the raylib texture NOTE: These functions require GPU access.
◆ RlTexture() [1/3]
| raylib::texture::RlTexture::RlTexture |
( |
const std::string & |
fileName | ) |
|
|
explicit |
Create a RlTexture from file.
- Parameters
-
| fileName | the file name of the texture |
◆ RlTexture() [2/3]
Create a RlTexture from image.
- Parameters
-
| image | the image of the texture |
◆ RlTexture() [3/3]
| raylib::texture::RlTexture::RlTexture |
( |
const image::RlImage & |
image, |
|
|
const CubemapLayout & |
layout |
|
) |
| |
|
explicit |
Craete a RlTexture, cubemap from image, multiple image cubemap layouts supported.
- Parameters
-
| image | the image |
| layout | the layout |
◆ ~RlTexture()
| raylib::texture::RlTexture::~RlTexture |
( |
| ) |
|
◆ genTextureMipmaps()
| void raylib::texture::RlTexture::genTextureMipmaps |
( |
| ) |
|
Generate mipmaps for GPU texture.
◆ get()
| const Texture2D & raylib::texture::RlTexture::get |
( |
| ) |
const |
Get the texture.
- Returns
- the immutable raylib texture
◆ getFormat()
| const int & raylib::texture::RlTexture::getFormat |
( |
| ) |
const |
Get texture format.
- Returns
- Data format (PixelFormat type)
◆ getHeight()
| const int & raylib::texture::RlTexture::getHeight |
( |
| ) |
const |
Get texture height.
- Returns
- the texture height
◆ getID()
| const unsigned int & raylib::texture::RlTexture::getID |
( |
| ) |
const |
Get OpenGL texture ID.
- Returns
- the OpenGL texture ID
◆ getMipmaps()
| const int & raylib::texture::RlTexture::getMipmaps |
( |
| ) |
const |
Get Mipmap levels, 1 by default.
- Returns
- the Mipmap levels
◆ getPath()
| const std::string & raylib::texture::RlTexture::getPath |
( |
| ) |
const |
Get the texture path.
- Returns
- the texture path
◆ getTexture()
| Texture2D & raylib::texture::RlTexture::getTexture |
( |
| ) |
|
Get the texture.
- Returns
- the mutable raylib texture
◆ getTextureRec()
| const Rectangle & raylib::texture::RlTexture::getTextureRec |
( |
| ) |
const |
Get the texture rectangle.
- Returns
- the texture rectangle
◆ getWidth()
| const int & raylib::texture::RlTexture::getWidth |
( |
| ) |
const |
Get texture width.
- Returns
- the texture width
◆ setFilter()
| void raylib::texture::RlTexture::setFilter |
( |
const TextureFilter & |
filter | ) |
|
Set GPU texture filter mode.
- Parameters
-
◆ setWrap()
| void raylib::texture::RlTexture::setWrap |
( |
const TextureWrap & |
wrap | ) |
|
Set texture wrapping mode.
- Parameters
-
◆ update()
| void raylib::texture::RlTexture::update |
( |
const void * |
pixels | ) |
|
Update GPU texture with new data.
- Parameters
-
◆ updateRect()
| void raylib::texture::RlTexture::updateRect |
( |
const Rectangle & |
rec, |
|
|
const void * |
pixels |
|
) |
| |
Update GPU texture rectangle with new data.
- Parameters
-
| rec | the rectangle |
| pixels | the pixels |
The documentation for this class was generated from the following files: