Otclient
14/8/2020
|
#include <painterogl1.h>
Public Types | |
enum | MatrixMode { MatrixProjection = 0x1701, MatrixTexture = 0x1702, MatrixTransform = 0x1700 } |
Public Types inherited from Painter | |
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 () |
Public Member Functions inherited from PainterOGL | |
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 () |
Public Member Functions inherited from Painter | |
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 | |
Protected Member Functions inherited from PainterOGL | |
void | updateGlTexture () |
void | updateGlCompositionMode () |
void | updateGlBlendEquation () |
void | updateGlClipRect () |
void | updateGlAlphaWriting () |
void | updateGlViewport () |
Protected Attributes inherited from PainterOGL | |
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 |
Protected Attributes inherited from Painter | |
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 213 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 63 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 138 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 189 of file painterogl1.cpp.
Implements Painter.
Definition at line 201 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 177 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 144 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 153 of file painterogl1.cpp.
|
virtual |
Implements Painter.
Definition at line 165 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 256 of file painterogl1.cpp.
void PainterOGL1::setMatrixMode | ( | PainterOGL1::MatrixMode | matrixMode | ) |
Definition at line 225 of file painterogl1.cpp.
|
virtual |
Reimplemented from Painter.
Definition at line 264 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 240 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 247 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 233 of file painterogl1.cpp.
|
virtual |
Reimplemented from PainterOGL.
Definition at line 57 of file painterogl1.cpp.