25 using std::unique_ptr;
70 auto vboManaged = Engine::getInstance()->getVBOManager()->addVBO(
"tdme.guirenderer", 5,
false,
false, created);
71 vboIds = vboManaged->getVBOIds();
75 sbIndices.put(
static_cast<uint16_t
>((i * 4 + 0)));
76 sbIndices.put(
static_cast<uint16_t
>((i * 4 + 1)));
77 sbIndices.put(
static_cast<uint16_t
>((i * 4 + 2)));
78 sbIndices.put(
static_cast<uint16_t
>((i * 4 + 2)));
79 sbIndices.put(
static_cast<uint16_t
>((i * 4 + 3)));
80 sbIndices.put(
static_cast<uint16_t
>((i * 4 + 0)));
86 ibIndices.put(i * 4 + 0);
87 ibIndices.put(i * 4 + 1);
88 ibIndices.put(i * 4 + 2);
89 ibIndices.put(i * 4 + 2);
90 ibIndices.put(i * 4 + 3);
91 ibIndices.put(i * 4 + 0);
101 Engine::getInstance()->getVBOManager()->removeVBO(
"tdme.guirenderer");
112 Engine::getGUIShader()->useProgram();
119 Engine::getGUIShader()->unUseProgram();
171 Engine::guiShader->setGradient(count, colors, colorStarts, rotationAngle);
175 Engine::guiShader->unsetGradient();
181 fontColor = GUIColor::GUICOLOR_WHITE.getArray();
215 fontColor = GUIColor::GUICOLOR_WHITE.getArray();
virtual void setTextureUnit(int contextIdx, int32_t textureUnit)=0
Sets up texture unit.
virtual void uploadIndicesBufferObject(int contextIdx, int32_t bufferObjectId, int32_t size, ShortBuffer *data)=0
Uploads buffer data to buffer object.
array< float, 4 > & getEffectColorAdd(int contextIdx)
Get effect color add.
Matrix3x3 & getTextureMatrix(int contextIdx)
Get texture matrix.
array< float, 4 > & getEffectColorMul(int contextIdx)
Get effect color mul.
virtual void unbindBufferObjects(int contextIdx)=0
Unbind buffer objects.
virtual void onUpdateTextureMatrix(int contextIdx)=0
Update texture matrix for active texture unit event.
void setMaskMaxValue(int contextIdx, float maskMaxValue)
Set mask max value.
virtual void bindTexture(int contextIdx, int32_t textureId)=0
Binds a texture with given id or unbinds when using ID_NONE.
virtual void bindIndicesBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind indices buffer object.
virtual bool isUsingShortIndices()=0
virtual void drawIndexedTrianglesFromBufferObjects(int contextIdx, int32_t triangles, int32_t trianglesOffset)=0
Draw indexed triangles from buffer objects.
virtual void bindSolidColorsBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind solid colors buffer object.
int32_t CONTEXTINDEX_DEFAULT
virtual void uploadBufferObject(int contextIdx, int32_t bufferObjectId, int32_t size, FloatBuffer *data)=0
Uploads buffer data to buffer object.
virtual void bindTextureCoordinatesBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind texture coordinates buffer object.
virtual void onUpdateEffect(int contextIdx)=0
Update material.
virtual void bindColorsBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind colors buffer object.
virtual void bindVertices2BufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind vertices 2 buffer object.
void setGUIEffectOffsetY(int guiEffectOffsetY)
Set GUI effect offset Y.
void setGUIEffectOffsetX(int guiEffectOffsetX)
Set GUI effect offset X.
GUI screen node that represents a screen that can be rendered via GUI system.
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.
void setMaskMaxValue(float maskMaxValue)
Set mask max value.
void setTexureMatrix(const Matrix3x3 &textureMatrix)
Set texture matrix.
FloatBuffer fbSolidColors
void unsetGradient()
Disable gradient.
GUIColor guiEffectColorMul
void setGUIEffectOffsetY(float guiEffectOffsetY)
Set GUI effect offset Y.
~GUIRenderer()
Destructor.
static constexpr float SCREEN_BOTTOM
static constexpr float SCREEN_TOP
array< float, 4 > effectColorMulFinal
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
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
static constexpr int QUAD_COUNT
vector< int32_t > * vboIds
unique_ptr< ByteBuffer > fbColorsByteBuffer
FloatBuffer fbTextureCoordinates
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
unique_ptr< ByteBuffer > fbSolidColorsByteBuffer
array< float, 4 > effectColorAddFinal
static constexpr float SCREEN_LEFT
array< float, 4 > effectColorMul
unique_ptr< ByteBuffer > fbTextureCoordinatesByteBuffer
Matrix3x3 class representing matrix3x3 mathematical structure and operations for 2d space.
Matrix3x3 & identity()
Creates identity matrix.
Matrix3x3 & set(float r0c0, float r0c1, float r0c2, float r1c0, float r1c1, float r1c2, float r2c0, float r2c1, float r2c2)
Sets this matrix by its components.
virtual int64_t getPosition()