![]() |
Meteor2D
dev internal
Meteor is a lightweight 2D game engine.
|
This a RenderCommand that draws an image on to the screen. More...
#include <texrendercmd.h>

Public Member Functions | |
| MTexRenderCmd (ERenderLayer layer, uint8_t sortingOrder) | |
| Constructor. | |
| void | bindTexture (MTexture *tex) |
| Bind a texture to draw. | |
| void | updateRect (SRect rect) |
| Update the Rect for rendering. | |
| void | updateSrcRect (SRect rect) |
| Update the Rect for image. Src Rect is the rect used for rendering specific parts of the texture. | |
| void | updateScale (SVector2 scale) |
| Update the scale of image during render. | |
| void | updatePivot (SVector2 pivot) |
| Update the pivot of image during render. | |
| void | updateRotation (float rotation) |
| Update rotation of the img during render. | |
| void | useSourceRect (bool useSrcRect) |
| Set to true if a part of the texture needs to be rendererd. | |
| void | render () override |
| Renders the image to screen. | |
| bool | isValid () override |
Public Member Functions inherited from meteor::MRenderCommand | |
| MRenderCommand (ERenderLayer layer, uint8_t sortingOrder) | |
| ERenderLayer | getLayer () |
| uint8_t | getSortingOrder () |
| void | setRenderCore (SDL_Renderer *rendererCore) |
Public Member Functions inherited from meteor::MEntity | |
| virtual bool | equals (MEntity *other) |
| Checks equality between two entities. | |
| std::string | getName () |
| void | setName (std::string name) |
| Sets name of entity. | |
| virtual std::string | toString () |
| Get this object as a string. | |
Additional Inherited Members | |
Protected Attributes inherited from meteor::MRenderCommand | |
| SDL_Renderer * | renderCore = NULL |
Protected Attributes inherited from meteor::MEntity | |
| std::string | name |
This a RenderCommand that draws an image on to the screen.
| meteor::MTexRenderCmd::MTexRenderCmd | ( | ERenderLayer | layer, |
| uint8_t | sortingOrder ) |
Constructor.
| layer | layer for rendering |
| sortingOrder | sorting order within the layer |
| void meteor::MTexRenderCmd::bindTexture | ( | MTexture * | tex | ) |
Bind a texture to draw.
| tex | Texture reference |
|
overridevirtual |
Reimplemented from meteor::MRenderCommand.
|
overridevirtual |
Renders the image to screen.
Reimplemented from meteor::MRenderCommand.
|
inline |
Update the pivot of image during render.
| pivot | Normalized Vector2 defining pivot |
|
inline |
Update rotation of the img during render.
| rotation |
|
inline |
Update the scale of image during render.
| scale | Vector2 defining scale |
|
inline |
Update the Rect for image. Src Rect is the rect used for rendering specific parts of the texture.
| rect | Src Rect. |
|
inline |
Set to true if a part of the texture needs to be rendererd.
| useSrcRect |