Otclient 1.0
14/8/2020
|
#include <painterogl1.h>
Public Types | |
enum | MatrixMode { MatrixProjection = 0x1701, MatrixTexture = 0x1702, MatrixTransform = 0x1700 } |
![]() | |
enum | BlendEquation { BlendEquation_Add, BlendEquation_Max } |
enum | CompositionMode { CompositionMode_Normal, CompositionMode_Multiply, CompositionMode_Add, CompositionMode_Replace, CompositionMode_DestBlending, CompositionMode_Light } |
enum | DrawMode { Triangles = GL_TRIANGLES, TriangleStrip = GL_TRIANGLE_STRIP } |
Public Member Functions | |
PainterOGL1 () | |
void | bind () |
void | unbind () |
void | refreshState () |
void | drawCoords (CoordsBuffer &coordsBuffer, DrawMode drawMode=Triangles) |
void | drawFillCoords (CoordsBuffer &coordsBuffer) |
void | drawTextureCoords (CoordsBuffer &coordsBuffer, const TexturePtr &texture) |
void | drawTexturedRect (const Rect &dest, const TexturePtr &texture, const Rect &src) |
void | drawUpsideDownTexturedRect (const Rect &dest, const TexturePtr &texture, const Rect &src) |
void | drawRepeatedTexturedRect (const Rect &dest, const TexturePtr &texture, const Rect &src) |
void | drawFilledRect (const Rect &dest) |
void | drawFilledTriangle (const Point &a, const Point &b, const Point &c) |
void | drawBoundingRect (const Rect &dest, int innerLineWidth) |
void | setMatrixMode (MatrixMode matrixMode) |
void | setTransformMatrix (const Matrix3 &transformMatrix) |
void | setProjectionMatrix (const Matrix3 &projectionMatrix) |
void | setTextureMatrix (const Matrix3 &textureMatrix) |
void | setColor (const Color &color) |
void | setOpacity (float opacity) |
bool | hasShaders () |
![]() | |
PainterOGL () | |
virtual | ~PainterOGL () |
void | resetState () |
void | saveState () |
void | saveAndResetState () |
void | restoreSavedState () |
void | clear (const Color &color) |
void | clearRect (const Color &color, const Rect &rect) |
virtual void | setCompositionMode (CompositionMode compositionMode) |
virtual void | setBlendEquation (BlendEquation blendEquation) |
virtual void | setClipRect (const Rect &clipRect) |
virtual void | setShaderProgram (PainterShaderProgram *shaderProgram) |
virtual void | setTexture (Texture *texture) |
virtual void | setAlphaWriting (bool enable) |
void | setTexture (const TexturePtr &texture) |
void | setResolution (const Size &resolution) |
void | scale (float x, float y) |
void | translate (float x, float y) |
void | rotate (float angle) |
void | rotate (float x, float y, float angle) |
void | pushTransformMatrix () |
void | popTransformMatrix () |
Matrix3 | getTransformMatrix () |
Matrix3 | getProjectionMatrix () |
Matrix3 | getTextureMatrix () |
BlendEquation | getBlendEquation () |
PainterShaderProgram * | getShaderProgram () |
bool | getAlphaWriting () |
void | resetBlendEquation () |
void | resetTexture () |
void | resetAlphaWriting () |
void | resetTransformMatrix () |
![]() | |
Painter () | |
virtual | ~Painter () |
void | drawTexturedRect (const Rect &dest, const TexturePtr &texture) |
void | setShaderProgram (const PainterShaderProgramPtr &shaderProgram) |
void | scale (float factor) |
void | translate (const Point &p) |
void | rotate (const Point &p, float angle) |
Size | getResolution () |
Color | getColor () |
float | getOpacity () |
Rect | getClipRect () |
CompositionMode | getCompositionMode () |
void | resetClipRect () |
void | resetOpacity () |
void | resetCompositionMode () |
void | resetColor () |
void | resetShaderProgram () |
Additional Inherited Members | |
![]() | |
void | updateGlTexture () |
void | updateGlCompositionMode () |
void | updateGlBlendEquation () |
void | updateGlClipRect () |
void | updateGlAlphaWriting () |
void | updateGlViewport () |
![]() | |
CoordsBuffer | m_coordsBuffer |
std::vector< Matrix3 > | m_transformMatrixStack |
Matrix3 | m_transformMatrix |
Matrix3 | m_projectionMatrix |
Matrix3 | m_textureMatrix |
BlendEquation | m_blendEquation |
Texture * | m_texture |
bool | m_alphaWriting |
PainterState | m_olderStates [10] |
int | m_oldStateIndex |
uint | m_glTextureId |
![]() | |
PainterShaderProgram * | m_shaderProgram |
CompositionMode | m_compositionMode |
Color | m_color |
Size | m_resolution |
float | m_opacity |
Rect | m_clipRect |
Painter using OpenGL 1.1 fixed-function rendering pipeline, compatible with OpenGL ES 1.0 and intended to be used on older graphics cards. Shaders are not available for this painter engine.
Definition at line 36 of file painterogl1.h.
Enumerator | |
---|---|
MatrixProjection | |
MatrixTexture | |
MatrixTransform |
Definition at line 39 of file painterogl1.h.
PainterOGL1::PainterOGL1 | ( | ) |
|
virtual |
Reimplemented from PainterOGL.
Definition at line 47 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 215 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 63 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 140 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 191 of file painterogl1.cpp.
Implements Painter.
Definition at line 203 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 179 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 146 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 155 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 167 of file painterogl1.cpp.
|
inlinevirtual |
Implements Painter.
Definition at line 69 of file painterogl1.h.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 36 of file painterogl1.cpp.
|
virtual |
Reimplemented from Painter.
Definition at line 259 of file painterogl1.cpp.
void PainterOGL1::setMatrixMode | ( | PainterOGL1::MatrixMode | matrixMode | ) |
Definition at line 227 of file painterogl1.cpp.
|
virtual |
Reimplemented from Painter.
Definition at line 267 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 243 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 250 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 236 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 57 of file painterogl1.cpp.