Represents a texture. Use RenderingSystem::TexturePool to allocate a new Texture.
More...
#include <RenderingSystem.hpp>
|
vec2dw | GetSize () const |
| Size of the image loaded into the texture. More...
|
|
GLuint | GetName () const |
| Name of the texture, as recognized by OpenGL. More...
|
|
std::string | GetPath () const |
| Path to the image on disk or PATH. More...
|
|
void | Draw (vec2 Position, vec2 DestinationSize, vec2 SrcPosition, vec2 SrcSize, float angle, float transparency, vec2 Hotspot, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws a rectangle of the texture on a destination rectangle. More...
|
|
void | Draw (vec2 Position, vec2 DestinationSize, vec2 SrcPosition, vec2 SrcSize, float angle, float transparency, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws a rectangle of the texture on a destination rectangle. More...
|
|
void | Draw (vec2 Position, vec2 DestinationSize, float angle, float transparency, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws the current texture on a destination rectangle. More...
|
|
void | Draw (vec2 Position, vec2 DestinationSize, float angle, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws the current texture on a destination rectangle. More...
|
|
void | Draw (vec2 Position, vec2 DestinationSize, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws the current texture on a destination rectangle. More...
|
|
void | Draw (vec2 Position, float transparency, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws the current texture on a certain point. More...
|
|
void | Draw (vec2 Position, Color4 tint, float scale, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws the current texture on a certain point. More...
|
|
void | Draw (vec2 Position, Color4 tint, RenderProperty rp=RENDER_NORMALLY, RenderEffect re=MODULATE_EFFECT) |
| Draws the current texture on a certain point. More...
|
|
Represents a texture. Use RenderingSystem::TexturePool to allocate a new Texture.
◆ Draw() [1/8]
Draws a rectangle of the texture on a destination rectangle.
- Parameters
-
Position | Top left vertex of the destination quad. |
DestinationSize | Width and height of the destination quad. |
SrcPosition | Top left vertex of the source quad. |
SrcSize | Width and height of the source quad. |
angle | Angle in degrees, relative to the top left of the image, in which it should be rotated. |
transparency | Alpha rating for rendering the whole texture. |
Hotspot | Point on the texture to be considered the center of the texture. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [2/8]
Draws a rectangle of the texture on a destination rectangle.
- Parameters
-
Position | Top left vertex of the destination quad. |
DestinationSize | Width and height of the destination quad. |
SrcPosition | Top left vertex of the source quad. |
SrcSize | Width and height of the source quad. |
angle | Angle in degrees, relative to the top left of the image, in which it should be rotated. |
transparency | Alpha rating for rendering the whole texture. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [3/8]
Draws the current texture on a destination rectangle.
- Parameters
-
Position | Top left vertex of the destination quad. |
DestinationSize | Width and height of the destination quad. |
angle | Angle in degrees, relative to the top left of the image, in which it should be rotated. |
transparency | Alpha rating for rendering the whole texture. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [4/8]
Draws the current texture on a destination rectangle.
- Parameters
-
Position | Top left vertex of the destination quad. |
DestinationSize | Width and height of the destination quad. |
angle | Angle in degrees, relative to the top left of the image, in which it should be rotated. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [5/8]
Draws the current texture on a destination rectangle.
- Parameters
-
Position | Top left vertex of the destination quad. |
DestinationSize | Width and height of the destination quad. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [6/8]
Draws the current texture on a certain point.
- Parameters
-
Position | Top left vertex of the texture to be rendered. |
transparency | Alpha rating for rendering the whole texture. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [7/8]
Draws the current texture on a certain point.
- Parameters
-
Position | Top left vertex of the texture to be rendered. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
scale | Magnification of the texture to be drawn. Defaults to 1x (1.0f). |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ Draw() [8/8]
Draws the current texture on a certain point.
- Parameters
-
Position | Top left vertex of the texture to be rendered. |
tint | Color to tint the sprite. Defaults to White (1.0f, 1.0f, 1.0f, 1.0f). The alpha factor will be used to measure intensity of tinting. |
rp | Property regarding whether the texture will be flipped in some way or not. Defaults to RENDER_NORMALLY. |
re | Effect when rendering the texture. Defaults to MODULATE_EFFECT. |
◆ GetName()
GLuint OficinaFramework::RenderingSystem::Texture::GetName |
( |
| ) |
const |
Name of the texture, as recognized by OpenGL.
- Returns
- Texture identifier on the GPU.
◆ GetPath()
std::string OficinaFramework::RenderingSystem::Texture::GetPath |
( |
| ) |
const |
Path to the image on disk or PATH.
- Returns
- Actual path to the texture on PATH.
◆ GetSize()
vec2dw OficinaFramework::RenderingSystem::Texture::GetSize |
( |
| ) |
const |
Size of the image loaded into the texture.
- Returns
- A dword-precision vec2 containing the texture's width and height.
◆ RenderingSystem::TexturePool
The documentation for this class was generated from the following file: