25 using std::unique_ptr;
379 this->stackedEffects.emplace_back(
385 for (
auto effect: effects) effect->apply(
this);
411 inline bool isQuadVisible(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4) {
443 inline bool isQuadVisible2(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4) {
507 inline void addQuad(
float x1,
float y1,
float colorR1,
float colorG1,
float colorB1,
float colorA1,
float tu1,
float tv1,
float x2,
float y2,
float colorR2,
float colorG2,
float colorB2,
float colorA2,
float tu2,
float tv2,
float x3,
float y3,
float colorR3,
float colorG3,
float colorB3,
float colorA3,
float tu3,
float tv3,
float x4,
float y4,
float colorR4,
float colorG4,
float colorB4,
float colorA4,
float tu4,
float tv4,
bool solidColor =
false,
bool rotated =
false) {
509 Console::println(
"GUIRenderer::addQuad()::too many quads");
538 auto quadBottom = y3;
554 tv1 = tv1 + ((tv3 - tv1) * ((y1 -
renderAreaTop) / (y1 - y3)));
555 tv2 = tv2 + ((tv4 - tv2) * ((y2 -
renderAreaTop) / (y1 - y4)));
596 if (rotated ==
false) {
615 if (solidColor ==
true) {
661 void setGradient(
int count, array<GUIColor, 10>& colors, array<float, 10>& colorStarts,
float rotationAngle);
const array< float, 4 > & getArray() const
GUI screen node that represents a screen that can be rendered via GUI system.
void setSubRenderAreaBottom(float renderAreaBottom)
Set sub render area bottom.
unique_ptr< ByteBuffer > sbIndicesByteBuffer
void setGradient(int count, array< GUIColor, 10 > &colors, array< float, 10 > &colorStarts, float rotationAngle)
Set gradient properties.
void setRenderAreaLeft(float renderAreaLeft)
Set up render area left.
void initRendering()
Init rendering.
float getGUIEffectOffsetY()
void setMaskMaxValue(float maskMaxValue)
Set mask max value.
const GUIColor & getGUIEffectColorAdd()
void setTexureMatrix(const Matrix3x3 &textureMatrix)
Set texture matrix.
float getGUIEffectOffsetX()
float getRenderAreaBottom()
FloatBuffer fbSolidColors
void unsetGradient()
Disable gradient.
GUIColor guiEffectColorMul
void setGUIEffectOffsetY(float guiEffectOffsetY)
Set GUI effect offset Y.
~GUIRenderer()
Destructor.
void setGUIEffectColorMul(const GUIColor &color)
Set GUI effect color mul.
static constexpr float SCREEN_BOTTOM
float getRenderAreaLeft()
static constexpr float SCREEN_TOP
array< float, 4 > effectColorMulFinal
void setGUIEffectColorAdd(const GUIColor &color)
Set GUI effect color add.
void initScreen(GUIScreenNode *screenNode)
Init screen.
void bindTexture(int32_t textureId)
Bind texture.
void setGUIEffectOffsetX(float guiEffectOffsetX)
Set GUI effect offset X.
void doneRendering()
Done rendering.
array< float, 4 > effectColorAdd
vector< GUIEffectStackEntity > stackedEffects
void doneScreen()
Done screen.
GUIScreenNode * screenNode
GUIColor guiEffectColorAdd
void setRenderAreaRight(float renderAreaRight)
Set up render area right.
void setRenderAreaTop(float renderAreaTop)
Set up render area top.
static constexpr float SCREEN_RIGHT
void setSubRenderAreaRight(float renderAreaRight)
Set sub render area right.
void setSubRenderAreaLeft(float renderAreaLeft)
Set sub render area left.
static constexpr int QUAD_COUNT
void setEffectColorAdd(const GUIColor &color)
Set effect color add.
vector< int32_t > * vboIds
bool isQuadVisible(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
bool isQuadVisible2(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
unique_ptr< ByteBuffer > fbColorsByteBuffer
void setSubRenderAreaTop(float renderAreaTop)
Set sub render area top.
FloatBuffer fbTextureCoordinates
void popEffects()
Pop effects.
GUIScreenNode * getScreenNode()
void setGUI(GUI *gui)
Set GUI.
void setRenderOffsetY(float renderOffsetY)
Set render offset y.
void setEffectColorMul(const GUIColor &color)
Set effect color mul.
void pushEffects(const vector< GUIEffect * > &effects)
Push effects @oaran effects effects.
unique_ptr< ByteBuffer > fbVerticesByteBuffer
void bindMask(int32_t textureId)
Bind mask texture.
void setRenderAreaBottom(float renderAreaBottom)
Set up render area bottom.
array< float, 4 > fontColor
float getRenderAreaRight()
void addQuad(float x1, float y1, float colorR1, float colorG1, float colorB1, float colorA1, float tu1, float tv1, float x2, float y2, float colorR2, float colorG2, float colorB2, float colorA2, float tu2, float tv2, float x3, float y3, float colorR3, float colorG3, float colorB3, float colorA3, float tu3, float tv3, float x4, float y4, float colorR4, float colorG4, float colorB4, float colorA4, float tu4, float tv4, bool solidColor=false, bool rotated=false)
Add quad Note: quad vertices order 1 2 +-—+ | | | | +-—+ 4 3.
unique_ptr< ByteBuffer > fbSolidColorsByteBuffer
array< float, 4 > effectColorAddFinal
static constexpr float SCREEN_LEFT
void setFontColor(const GUIColor &color)
Set effect color mul.
array< float, 4 > effectColorMul
const GUIColor & getGUIEffectColorMul()
void setRenderOffsetX(float renderOffsetX)
Set render offset x.
GUIRenderer(Renderer *renderer)
Public constructor.
unique_ptr< ByteBuffer > fbTextureCoordinatesByteBuffer
Matrix3x3 class representing matrix3x3 mathematical structure and operations for 2d space.
FloatBuffer * put(float value)
Put a float value into float buffer.
GUIColor guiEffectColorMul
GUIColor guiEffectColorAdd
GUIEffectStackEntity(const GUIColor &guiEffectColorMul, const GUIColor &guiEffectColorAdd, float guiEffectOffsetX, float guiEffectOffsetY)
#define FORBID_CLASS_COPY(CLASS)