Go to the documentation of this file.
31 m_drawProgram =
nullptr;
35 assert(m_drawTexturedProgram);
38 m_drawTexturedProgram->
link();
41 assert(m_drawSolidColorProgram);
44 m_drawSolidColorProgram->
link();
79 m_drawProgram->
bind();
115 glDrawArrays(GL_TRIANGLES, 0, vertexCount);
117 glDrawArrays(GL_TRIANGLE_STRIP, 0, vertexCount);
132 if(texture && texture->
isEmpty())
193 if(a == b || a == c || b == c)
205 if(dest.
isEmpty() || innerLineWidth == 0)
void addRepeatedRects(const Rect &dest, const Rect &src)
void drawFillCoords(CoordsBuffer &coordsBuffer)
void drawFilledTriangle(const Point &a, const Point &b, const Point &c)
void setColor(const Color &color)
void addUpsideDownQuad(const Rect &dest, const Rect &src)
CoordsBuffer m_coordsBuffer
int getTextureCoordCount()
void setProjectionMatrix(const Matrix3 &projectionMatrix)
static void unbind(Type type)
void setResolution(const Size &resolution)
void setTransformMatrix(const Matrix3 &transformMatrix)
void drawTexturedRect(const Rect &dest, const TexturePtr &texture, const Rect &src)
static void disableAttributeArray(int location)
void drawCoords(CoordsBuffer &coordsBuffer, DrawMode drawMode=Triangles)
void drawTextureCoords(CoordsBuffer &coordsBuffer, const TexturePtr &texture)
void drawUpsideDownTexturedRect(const Rect &dest, const TexturePtr &texture, const Rect &src)
void drawFilledRect(const Rect &dest)
PainterOGL2 * g_painterOGL2
void setOpacity(float opacity)
void drawRepeatedTexturedRect(const Rect &dest, const TexturePtr &texture, const Rect &src)
void addBoudingRect(const Rect &dest, int innerLineWidth)
Matrix3 m_transformMatrix
HardwareBuffer * getHardwareTextureCoordArray()
stdext::shared_object_ptr< PainterShaderProgram > PainterShaderProgramPtr
void drawBoundingRect(const Rect &dest, int innerLineWidth=1)
void addRect(const Rect &dest)
static void enableAttributeArray(int location)
Matrix3 m_projectionMatrix
virtual void setTexture(Texture *texture)
HardwareBuffer * getHardwareVertexArray()
void setTextureMatrix(const Matrix3 &textureMatrix)
void setAttributeArray(int location, const float *values, int size, int stride=0)
void addQuad(const Rect &dest, const Rect &src)
float * getTextureCoordArray()
void addTriangle(const Point &a, const Point &b, const Point &c)
bool addShaderFromSourceCode(Shader::ShaderType shaderType, const std::string &sourceCode)
void setDrawProgram(PainterShaderProgram *drawProgram)
PainterShaderProgram * m_shaderProgram