![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
A Texture that is not managed by C++ RAII. More...
#include <TextureUnmanaged.hpp>
Public Member Functions | |
| TextureUnmanaged () | |
| Default texture constructor. | |
| TextureUnmanaged (::Texture &&other) | |
| TextureUnmanaged (const ::Image &image) | |
| Creates a texture from the given Image. | |
| TextureUnmanaged (const ::Image &image, int layout) | |
| Load cubemap from image, multiple image cubemap layouts supported. | |
| TextureUnmanaged (const ::Texture &texture) | |
| Creates a texture object based on the given Texture struct data. | |
| TextureUnmanaged (const std::string &fileName) | |
| Load texture from file into GPU memory (VRAM) | |
| TextureUnmanaged (unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8) | |
| Move/Create a texture structure manually. | |
| void | Draw (::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const |
| Draws a texture (or part of it) that stretches or shrinks nicely. | |
| void | Draw (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const |
| Draw a part of a texture defined by a rectangle with 'pro' parameters. | |
| void | Draw (::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) const |
| Draw a part of a texture defined by a rectangle. | |
| void | Draw (::Vector2 position, ::Color tint={255, 255, 255, 255}) const |
| Draw a Texture2D with position defined as Vector2. | |
| void | Draw (::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const |
| Draw a Texture2D with extended parameters. | |
| void | Draw (int posX=0, int posY=0, ::Color tint={255, 255, 255, 255}) const |
| Draw a Texture2D. | |
| void | DrawBillboard (const ::Camera &camera, ::Rectangle source, ::Vector3 position, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const |
| Draw a billboard texture defined by source. | |
| void | DrawBillboard (const ::Camera &camera, ::Rectangle source, Vector3 position, ::Vector3 up, Vector2 size, Vector2 origin, float rotation=0.0f, ::Color tint={255, 255, 255, 255}) const |
| Draw a billboard texture defined by source and rotation. | |
| void | DrawBillboard (const ::Camera &camera, ::Vector3 position, float size, ::Color tint={255, 255, 255, 255}) const |
| Draw a billboard texture. | |
| TextureUnmanaged & | GenMipmaps () |
| Generate GPU mipmaps for a texture. | |
| ::Image | GetData () const |
| Get pixel data from GPU texture and return an Image. | |
| int | GetFormat () const |
| Retrieves the format value for the object. | |
| int | GetHeight () const |
| Retrieves the height value for the object. | |
| unsigned int | GetId () const |
| Retrieves the id value for the object. | |
| int | GetMipmaps () const |
| Retrieves the mipmaps value for the object. | |
| Vector2 | GetSize () const |
| Retrieve the width and height of the texture. | |
| int | GetWidth () const |
| Retrieves the width value for the object. | |
| bool | IsValid () const |
| Determines whether or not the Texture has been loaded and is ready. | |
| void | Load (const ::Image &image) |
| Load texture from image data. | |
| void | Load (const ::Image &image, int layoutType) |
| Load cubemap from image, multiple image cubemap layouts supported. | |
| void | Load (const std::string &fileName) |
| Load texture from file into GPU memory (VRAM) | |
| operator Image () | |
| Get pixel data from GPU texture and return an Image. | |
| TextureUnmanaged & | operator= (const ::Texture &texture) |
| TextureUnmanaged & | SetFilter (int filterMode) |
| Set texture scaling filter mode. | |
| TextureUnmanaged & | SetMaterial (::Material *material, int mapType=MATERIAL_MAP_NORMAL) |
| Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) | |
| TextureUnmanaged & | SetMaterial (const ::Material &material, int mapType=MATERIAL_MAP_NORMAL) |
| TextureUnmanaged & | SetShaderValue (const ::Shader &shader, int locIndex) |
| Set shader uniform value for texture (sampler2d) | |
| TextureUnmanaged & | SetShapes (const ::Rectangle &source) |
| Set texture and rectangle to be used on shapes drawing. | |
| TextureUnmanaged & | SetWrap (int wrapMode) |
| Set texture wrapping mode. | |
| void | Unload () |
| Unload texture from GPU memory (VRAM) | |
| TextureUnmanaged & | Update (::Rectangle rec, const void *pixels) |
| Update GPU texture rectangle with new data. | |
| TextureUnmanaged & | Update (const void *pixels) |
| Update GPU texture with new data. | |
Protected Member Functions | |
| void | set (const ::Texture &texture) |
A Texture that is not managed by C++ RAII.
Make sure to Unload() this if needed, otherwise use raylib::Texture.
Definition at line 21 of file TextureUnmanaged.hpp.
|
inline |
Default texture constructor.
Definition at line 26 of file TextureUnmanaged.hpp.
|
inline |
Move/Create a texture structure manually.
Definition at line 33 of file TextureUnmanaged.hpp.
|
inline |
Creates a texture object based on the given Texture struct data.
Definition at line 46 of file TextureUnmanaged.hpp.
|
inline |
Creates a texture from the given Image.
| raylib::RaylibException | Throws if failed to create the texture from the given image. |
Definition at line 56 of file TextureUnmanaged.hpp.
References Load().
|
inline |
Load cubemap from image, multiple image cubemap layouts supported.
| raylib::RaylibException | Throws if failed to create the texture from the given cubemap. |
Definition at line 65 of file TextureUnmanaged.hpp.
References Load().
|
inline |
Load texture from file into GPU memory (VRAM)
| raylib::RaylibException | Throws if failed to create the texture from the given file. |
Definition at line 72 of file TextureUnmanaged.hpp.
References Load().
|
inline |
Definition at line 74 of file TextureUnmanaged.hpp.
|
inline |
Draws a texture (or part of it) that stretches or shrinks nicely.
Definition at line 238 of file TextureUnmanaged.hpp.
|
inline |
Draw a part of a texture defined by a rectangle with 'pro' parameters.
Definition at line 224 of file TextureUnmanaged.hpp.
|
inline |
Draw a part of a texture defined by a rectangle.
Definition at line 215 of file TextureUnmanaged.hpp.
|
inline |
Draw a Texture2D with position defined as Vector2.
Definition at line 199 of file TextureUnmanaged.hpp.
|
inline |
Draw a Texture2D with extended parameters.
Definition at line 206 of file TextureUnmanaged.hpp.
|
inline |
|
inline |
Draw a billboard texture defined by source.
Definition at line 262 of file TextureUnmanaged.hpp.
|
inline |
Draw a billboard texture defined by source and rotation.
Definition at line 276 of file TextureUnmanaged.hpp.
|
inline |
Draw a billboard texture.
Definition at line 253 of file TextureUnmanaged.hpp.
|
inline |
Generate GPU mipmaps for a texture.
Definition at line 164 of file TextureUnmanaged.hpp.
|
inline |
Get pixel data from GPU texture and return an Image.
Definition at line 154 of file TextureUnmanaged.hpp.
Referenced by operator Image().
|
inline |
Retrieves the format value for the object.
Definition at line 82 of file TextureUnmanaged.hpp.
|
inline |
Retrieves the height value for the object.
Definition at line 80 of file TextureUnmanaged.hpp.
|
inline |
Retrieves the id value for the object.
Definition at line 78 of file TextureUnmanaged.hpp.
|
inline |
Retrieves the mipmaps value for the object.
Definition at line 81 of file TextureUnmanaged.hpp.
|
inline |
Retrieve the width and height of the texture.
Definition at line 92 of file TextureUnmanaged.hpp.
|
inline |
Retrieves the width value for the object.
Definition at line 79 of file TextureUnmanaged.hpp.
|
inline |
|
inline |
Load texture from image data.
Definition at line 97 of file TextureUnmanaged.hpp.
References IsValid().
Referenced by TextureUnmanaged(), TextureUnmanaged(), TextureUnmanaged(), raylib::Texture::Load(), raylib::Texture::Load(), and raylib::Texture::Load().
|
inline |
Load cubemap from image, multiple image cubemap layouts supported.
Definition at line 107 of file TextureUnmanaged.hpp.
References IsValid().
|
inline |
Load texture from file into GPU memory (VRAM)
Definition at line 117 of file TextureUnmanaged.hpp.
References IsValid().
|
inline |
Get pixel data from GPU texture and return an Image.
Definition at line 159 of file TextureUnmanaged.hpp.
References GetData().
|
inline |
Definition at line 84 of file TextureUnmanaged.hpp.
|
inlineprotected |
Definition at line 324 of file TextureUnmanaged.hpp.
|
inline |
Set texture scaling filter mode.
Definition at line 172 of file TextureUnmanaged.hpp.
|
inline |
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition at line 291 of file TextureUnmanaged.hpp.
|
inline |
Definition at line 296 of file TextureUnmanaged.hpp.
|
inline |
Set shader uniform value for texture (sampler2d)
Definition at line 312 of file TextureUnmanaged.hpp.
|
inline |
Set texture and rectangle to be used on shapes drawing.
Definition at line 304 of file TextureUnmanaged.hpp.
|
inline |
Set texture wrapping mode.
Definition at line 180 of file TextureUnmanaged.hpp.
|
inline |
Unload texture from GPU memory (VRAM)
Definition at line 127 of file TextureUnmanaged.hpp.
Referenced by raylib::Texture::~Texture(), raylib::Texture::Load(), raylib::Texture::Load(), raylib::Texture::Load(), and raylib::Texture::operator=().
|
inline |
Update GPU texture rectangle with new data.
Definition at line 146 of file TextureUnmanaged.hpp.
|
inline |
Update GPU texture with new data.
Definition at line 138 of file TextureUnmanaged.hpp.