mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-08 15:19:50 +00:00
Add skel/bone gridDrawOrder attrib to control the way the gris is drawn
Also ignore grid.z (used as worldmap alpha) by default because it's really only needed for the world map and ignoring it results in less GL calls.
This commit is contained in:
parent
e35dfb9f68
commit
58e9ba340e
5 changed files with 189 additions and 24 deletions
14
BBGE/Quad.h
14
BBGE/Quad.h
|
@ -74,7 +74,14 @@ public:
|
|||
|
||||
InterpolatedVector upperLeftTextureCoordinates, lowerRightTextureCoordinates;
|
||||
|
||||
enum GridDrawOrder
|
||||
{
|
||||
GRID_DRAW_WORLDMAP = -1, // LRTB order, uses grid.z as alpha
|
||||
GRID_DRAW_LRTB = 0, // the default. ignores grid.z
|
||||
GRID_DRAW_LRBT = 1, // Y axis inverted
|
||||
|
||||
GRID_DRAW_DEFAULT = GRID_DRAW_LRTB
|
||||
};
|
||||
|
||||
enum GridType
|
||||
{
|
||||
|
@ -104,7 +111,9 @@ protected:
|
|||
void resetGrid();
|
||||
void updateGrid(float dt);
|
||||
void renderGrid(const RenderState& rs) const;
|
||||
|
||||
void renderGrid_LRTB(const RenderState& rs) const;
|
||||
void renderGrid_LRBT(const RenderState& rs) const;
|
||||
void renderGridWithAlpha(const RenderState& rs) const;
|
||||
|
||||
float drawGridOffsetX;
|
||||
float drawGridOffsetY;
|
||||
|
@ -116,6 +125,9 @@ protected:
|
|||
void onSetTexture();
|
||||
void onRender(const RenderState& rs) const OVERRIDE;
|
||||
void onUpdate(float dt);
|
||||
|
||||
public:
|
||||
GridDrawOrder drawOrder;
|
||||
private:
|
||||
bool doUpdateGrid;
|
||||
void initQuad();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue