Go to the documentation of this file.
107 glClearColor(color.
rF(), color.
gF(), color.
bF(), color.
aF());
108 glClear(GL_COLOR_BUFFER_BIT);
115 glClearColor(color.
rF(), color.
gF(), color.
bF(), color.
aF());
116 glClear(GL_COLOR_BUFFER_BIT);
154 glTextureId = texture->
getId();
188 Matrix3 projectionMatrix = { 2.0f/resolution.
width(), 0.0f, 0.0f,
189 0.0f, -2.0f/resolution.
height(), 0.0f,
224 std::cos(angle), -std::sin(angle), 0.0f,
225 std::sin(angle), std::cos(angle), 0.0f,
263 glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE);
265 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
268 glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA);
271 glBlendFunc(GL_ONE, GL_ONE);
274 glBlendFunc(GL_ONE, GL_ZERO);
277 glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA);
280 glBlendFunc(GL_ZERO, GL_SRC_COLOR);
290 glBlendEquation(0x8006);
292 glBlendEquation(0x8008);
298 glEnable(GL_SCISSOR_TEST);
302 glDisable(GL_SCISSOR_TEST);
309 glColorMask(1,1,1,1);
311 glColorMask(1,1,1,0);
virtual void setColor(const Color &color)
std::vector< Matrix3 > m_transformMatrixStack
void pushTransformMatrix()
Painter::CompositionMode compositionMode
bool canUseBlendFuncSeparate()
bool canUseBlendEquation()
Painter::BlendEquation blendEquation
void setResolution(const Size &resolution)
@ CompositionMode_DestBlending
PainterState m_olderStates[10]
virtual void setClipRect(const Rect &clipRect)
@ CompositionMode_Replace
void updateGlBlendEquation()
void translate(float x, float y)
const Matrix3 & getTransformMatrix()
Matrix< M, N, T > transposed() const
PainterShaderProgram * shaderProgram
void clear(const Color &color)
Matrix3 m_transformMatrix
void resetShaderProgram()
virtual void setTextureMatrix(const Matrix3 &textureMatrix)
virtual void setShaderProgram(PainterShaderProgram *shaderProgram)
void updateGlAlphaWriting()
void clearRect(const Color &color, const Rect &rect)
virtual void setCompositionMode(CompositionMode compositionMode)
BlendEquation m_blendEquation
virtual void setProjectionMatrix(const Matrix3 &projectionMatrix)
Matrix3 m_projectionMatrix
void resetBlendEquation()
virtual void setTexture(Texture *texture)
@ CompositionMode_Multiply
void popTransformMatrix()
void resetTransformMatrix()
virtual void setBlendEquation(BlendEquation blendEquation)
virtual void setTransformMatrix(const Matrix3 &transformMatrix)
virtual void setAlphaWriting(bool enable)
CompositionMode m_compositionMode
PainterShaderProgram * m_shaderProgram
void scale(float x, float y)
virtual void setOpacity(float opacity)
void updateGlCompositionMode()
void resetCompositionMode()
virtual void refreshState()