![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
Public Member Functions | |
| Texture () | |
| Texture (const ::Image &image) | |
| Texture (const ::Texture &texture) | |
| Texture (const std::string &fileName) | |
| Load texture from file into GPU memory (VRAM) More... | |
| ~Texture () | |
| Texture & | Draw () |
| Draws the texture at the top left corner of the screen. More... | |
| Texture & | Draw (::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) |
| Texture & | Draw (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) |
| Texture & | Draw (::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) |
| Texture & | Draw (::Vector2 position, ::Color tint={255, 255, 255, 255}) |
| Texture & | Draw (::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) |
| Texture & | Draw (::Vector2 tiling, ::Vector2 offset, ::Rectangle quad, ::Color tint={255, 255, 255, 255}) |
| Texture & | Draw (::Vector3 position, float width, float height, float length, ::Color color={255, 255, 255, 255}) |
| Texture & | Draw (int posX, int posY, ::Color tint={255, 255, 255, 255}) |
| Draw a Texture2D. More... | |
| Texture & | DrawTiled (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, float scale=1, Color tint={255, 255, 255, 255}) |
| Texture & | GenMipmaps () |
| Generate GPU mipmaps for a texture. More... | |
| inline ::Image | GetData () const |
| Get pixel data from GPU texture and return an Image. More... | |
| int | GetFormat () const |
| int | GetHeight () const |
| unsigned int | GetId () const |
| int | GetMipmaps () const |
| inline ::Vector2 | GetSize () |
| Retrieve the width and height of the texture. More... | |
| int | GetWidth () const |
| void | Load (const std::string &fileName) |
| Load texture from file into GPU memory (VRAM) More... | |
| void | LoadFromImage (const ::Image &image) |
| Load texture from image data. More... | |
| void | LoadTextureCubemap (const ::Image &image, int layoutType) |
| Load cubemap from image, multiple image cubemap layouts supported. More... | |
| operator raylib::Image () | |
| Get pixel data from GPU texture and return an Image. More... | |
| Texture & | operator= (const ::Texture &texture) |
| Texture & | operator= (const Texture &texture) |
| Texture & | SetFilter (int filterMode) |
| Set texture scaling filter mode. More... | |
| void | SetFormat (int value) |
| void | SetHeight (int value) |
| void | SetId (unsigned int value) |
| Texture & | SetMaterial (::Material *material, int mapType) |
| Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) More... | |
| void | SetMipmaps (int value) |
| Texture & | SetShapes (::Rectangle source) |
| Define default texture used to draw shapes. More... | |
| void | SetWidth (int value) |
| Texture & | SetWrap (int wrapMode) |
| Set texture wrapping mode. More... | |
| void | Unload () |
| Unload texture from GPU memory (VRAM) More... | |
| Texture & | Update (const void *pixels) |
| Update GPU texture with new data. More... | |
| Texture & | UpdateRec (::Rectangle rec, const void *pixels) |
| Update GPU texture rectangle with new data. More... | |
Static Public Member Functions | |
| static int | GetPixelDataSize (int width, int height, int format) |
| Get pixel data size in bytes for certain format. More... | |
Protected Member Functions | |
| void | set (const ::Texture &texture) |
Definition at line 36 of file Texture.hpp.
|
inline |
Definition at line 38 of file Texture.hpp.
References set().
|
inline |
Definition at line 42 of file Texture.hpp.
References set().
|
inline |
Definition at line 46 of file Texture.hpp.
References LoadFromImage().
|
inline |
Load texture from file into GPU memory (VRAM)
Definition at line 53 of file Texture.hpp.
References Load().
|
inline |
Definition at line 57 of file Texture.hpp.
References Unload().
|
inline |
Draws the texture at the top left corner of the screen.
Definition at line 169 of file Texture.hpp.
|
inline |
Definition at line 210 of file Texture.hpp.
|
inline |
Definition at line 204 of file Texture.hpp.
|
inline |
Definition at line 192 of file Texture.hpp.
Definition at line 181 of file Texture.hpp.
|
inline |
Definition at line 186 of file Texture.hpp.
|
inline |
Definition at line 198 of file Texture.hpp.
|
inline |
Definition at line 216 of file Texture.hpp.
Draw a Texture2D.
Definition at line 176 of file Texture.hpp.
|
inline |
Definition at line 222 of file Texture.hpp.
|
inline |
Generate GPU mipmaps for a texture.
Definition at line 145 of file Texture.hpp.
|
inline |
Get pixel data from GPU texture and return an Image.
Definition at line 131 of file Texture.hpp.
Referenced by operator raylib::Image().
|
inline |
Definition at line 65 of file Texture.hpp.
|
inline |
Definition at line 63 of file Texture.hpp.
|
inline |
Definition at line 61 of file Texture.hpp.
|
inline |
Definition at line 64 of file Texture.hpp.
|
inlinestatic |
Get pixel data size in bytes for certain format.
Definition at line 239 of file Texture.hpp.
|
inline |
Retrieve the width and height of the texture.
Definition at line 80 of file Texture.hpp.
|
inline |
Definition at line 62 of file Texture.hpp.
|
inline |
Load texture from file into GPU memory (VRAM)
Definition at line 101 of file Texture.hpp.
References set().
Referenced by Texture().
|
inline |
Load texture from image data.
Definition at line 87 of file Texture.hpp.
References set().
Referenced by Texture().
|
inline |
Load cubemap from image, multiple image cubemap layouts supported.
Definition at line 94 of file Texture.hpp.
References set().
|
inline |
Get pixel data from GPU texture and return an Image.
Definition at line 138 of file Texture.hpp.
References GetData().
Definition at line 67 of file Texture.hpp.
References set().
Definition at line 72 of file Texture.hpp.
References set().
|
inlineprotected |
Definition at line 252 of file Texture.hpp.
Referenced by Load(), LoadFromImage(), LoadTextureCubemap(), operator=(), and Texture().
|
inline |
Set texture scaling filter mode.
Definition at line 153 of file Texture.hpp.
|
inline |
Definition at line 65 of file Texture.hpp.
|
inline |
Definition at line 63 of file Texture.hpp.
|
inline |
Definition at line 61 of file Texture.hpp.
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition at line 231 of file Texture.hpp.
|
inline |
Definition at line 64 of file Texture.hpp.
Define default texture used to draw shapes.
Definition at line 246 of file Texture.hpp.
|
inline |
Definition at line 62 of file Texture.hpp.
|
inline |
Set texture wrapping mode.
Definition at line 161 of file Texture.hpp.
|
inline |
Unload texture from GPU memory (VRAM)
Definition at line 108 of file Texture.hpp.
Referenced by ~Texture().
|
inline |
Update GPU texture with new data.
Definition at line 115 of file Texture.hpp.
Update GPU texture rectangle with new data.
Definition at line 123 of file Texture.hpp.
1.8.17