ManaPlus
|
#include <mobileopengl2graphics.h>
Public Member Functions | |
MobileOpenGL2Graphics () | |
~MobileOpenGL2Graphics () | |
void | postInit () |
void | setColor (const Color &color) |
void | screenResized () |
void | finalize (ImageCollection *const col) |
void | finalize (ImageVertexes *const vert) |
void | testDraw () |
void | removeArray (const uint32_t id, uint32_t *const arr) |
void | createGLContext (const bool custom) |
Public Member Functions inherited from Graphics | |
virtual | ~Graphics () |
void | setWindow (SDL_Surface *const window, const int width, const int height) |
SDL_Surface * | getWindow () const |
void | setSync (const bool sync) |
bool | getSync () const |
virtual bool | setVideoMode (const int w, const int h, const int scale, const int bpp, const bool fs, const bool hwaccel, const bool resize, const bool noFrame, const bool allowHighDPI)=0 |
bool | setFullscreen (const bool fs) |
virtual bool | resizeScreen (const int width, const int height) |
virtual void | restoreContext () |
virtual void | drawRescaledImage (const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight)=0 |
virtual void | drawPattern (const Image *const image, const int x, const int y, const int w, const int h)=0 |
virtual void | drawRescaledPattern (const Image *const image, const int x, const int y, const int w, const int h, const int scaledWidth, const int scaledHeight)=0 |
virtual void | drawImageRect (const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0 |
virtual void | calcPattern (ImageVertexes *const vert, const Image *const image, const int x, const int y, const int w, const int h) const =0 |
virtual void | calcPattern (ImageCollection *const vert, const Image *const image, const int x, const int y, const int w, const int h) const =0 |
virtual void | calcTileVertexes (ImageVertexes *const vert, const Image *const image, int x, int y) const =0 |
virtual void | calcTileSDL (ImageVertexes *const vert, int x, int y) const |
virtual void | drawTileVertexes (const ImageVertexes *const vert)=0 |
virtual void | drawTileCollection (const ImageCollection *const vertCol)=0 |
virtual void | calcTileCollection (ImageCollection *const vertCol, const Image *const image, int x, int y)=0 |
virtual void | calcWindow (ImageCollection *const vertCol, const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0 |
virtual void | fillRectangle (const Rect &rectangle)=0 |
virtual void | updateScreen ()=0 |
void | setWindowSize (const int width, const int height) |
int | getWidth () const |
int | getHeight () const |
int | getMemoryUsage () const |
virtual void | drawNet (const int x1, const int y1, const int x2, const int y2, const int width, const int height) |
ClipRect & | getTopClip () const |
void | setRedraw (const bool n) |
bool | getRedraw () const |
void | setSecure (const bool n) |
bool | getSecure () const |
int | getBpp () const |
bool | getFullScreen () const |
bool | getHWAccel () const |
bool | getDoubleBuffer () const |
RenderType | getOpenGL () const |
void | setNoFrame (const bool n) |
const std::string & | getName () const |
virtual void | initArrays (const int vertCount) |
const Color & | getColor () const |
virtual void | drawImage (const Image *const image, int dstX, int dstY)=0 |
virtual void | copyImage (const Image *const image, int dstX, int dstY)=0 |
virtual void | drawImageCached (const Image *const image, int srcX, int srcY)=0 |
virtual void | drawPatternCached (const Image *const image, const int x, const int y, const int w, const int h)=0 |
virtual void | completeCache ()=0 |
int | getScale () const |
virtual bool | isAllowScale () const |
void | setScale (int scale) |
virtual void | pushClipArea (const Rect &area) |
virtual void | popClipArea () |
virtual void | drawLine (int x1, int y1, int x2, int y2)=0 |
virtual void | drawRectangle (const Rect &rectangle)=0 |
virtual void | drawPoint (int x, int y)=0 |
virtual void | beginDraw () |
virtual void | endDraw () |
virtual void | clearScreen () const |
virtual void | deleteArrays () |
Private Member Functions | |
void | deleteGLObjects () |
void | drawQuad (const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height) A_INLINE |
void | drawRescaledQuad (const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight) A_INLINE |
void | drawTriangleArray (const int size) A_INLINE |
void | drawTriangleArray (const GLfloat *const array, const int size) A_INLINE |
void | drawLineArrays (const int size) A_INLINE |
void | bindArrayBuffer (const GLuint vbo) A_INLINE |
void | bindArrayBufferAndAttributes (const GLuint vbo) A_INLINE |
void | bindAttributes () A_INLINE |
Static Private Member Functions | |
static void | bindTexture2 (const GLenum target, const Image *const image) |
Private Attributes | |
GLfloat * | mFloatArray |
GLfloat * | mFloatArrayCached |
ShaderProgram * | mProgram |
float | mAlphaCached |
int | mVpCached |
float | mFloatColor |
int | mMaxVertices |
GLuint | mProgramId |
GLuint | mSimpleColorUniform |
GLint | mPosAttrib |
GLint | mTextureColorUniform |
GLuint | mScreenUniform |
GLuint | mDrawTypeUniform |
GLuint | mVao |
GLuint | mVbo |
GLuint | mVboBinded |
GLuint | mAttributesBinded |
bool | mColorAlpha |
bool | mTextureDraw |
FBOInfo | mFbo |
Static Private Attributes | |
static GLuint | mTextureSizeUniform = 0U |
static int | mTextureWidth = 1 |
static int | mTextureHeight = 1 |
Additional Inherited Members | |
Public Types inherited from Graphics | |
enum | Alignment { LEFT = 0 , CENTER , RIGHT } |
Static Public Member Functions inherited from Graphics | |
static void | cleanUp () |
Data Fields inherited from Graphics | |
int | mWidth |
int | mHeight |
int | mActualWidth |
int | mActualHeight |
Protected Member Functions inherited from Graphics | |
Graphics () | |
void | setMainFlags (const int w, const int h, const int scale, const int bpp, const bool fs, const bool hwaccel, const bool resize, const bool noFrame, const bool allowHighDPI) |
int | getOpenGLFlags () const |
int | getSoftwareFlags () const |
bool | setOpenGLMode () |
void | updateMemoryInfo () |
bool | videoInfo () |
void | setOpenGLFlags () |
Protected Attributes inherited from Graphics | |
MStack< ClipRect > | mClipStack |
SDL_Surface * | mWindow |
int | mBpp |
bool | mAlpha |
bool | mFullscreen |
bool | mHWAccel |
bool | mRedraw |
bool | mDoubleBuffer |
SDL_Rect | mRect |
bool | mSecure |
RenderType | mOpenGL |
bool | mEnableResize |
bool | mNoFrame |
bool | mAllowHighDPI |
std::string | mName |
int | mStartFreeMem |
bool | mSync |
int | mScale |
Color | mColor |
Static Protected Attributes inherited from Graphics | |
static void * | mGLContext = 0 |
Definition at line 64 of file mobileopengl2graphics.h.
MobileOpenGL2Graphics::MobileOpenGL2Graphics | ( | ) |
Definition at line 92 of file mobileopengl2graphics.cpp.
References Graphics::mName, Graphics::mOpenGL, and RENDER_GLES2_OPENGL.
MobileOpenGL2Graphics::~MobileOpenGL2Graphics | ( | ) |
Definition at line 124 of file mobileopengl2graphics.cpp.
References deleteArraysInternal(), and deleteGLObjects().
|
inlineprivate |
Definition at line 1186 of file mobileopengl2graphics.cpp.
References GL_ARRAY_BUFFER.
Referenced by postInit().
|
inlineprivate |
|
inlineprivate |
Definition at line 1214 of file mobileopengl2graphics.cpp.
References mAttributesBinded, and mVboBinded.
|
staticprivate |
Definition at line 1144 of file mobileopengl2graphics.cpp.
References mglBindTexture, mTextureBinded, mTextureHeight, mTextureSizeUniform, and mTextureWidth.
|
virtual |
Reimplemented from Graphics.
Definition at line 1267 of file mobileopengl2graphics.cpp.
References Graphics::createGLContext().
|
private |
Definition at line 130 of file mobileopengl2graphics.cpp.
References delete2, mProgram, mVao, and mVbo.
Referenced by screenResized(), and ~MobileOpenGL2Graphics().
|
inlineprivate |
Definition at line 1355 of file mobileopengl2graphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and EmoteDB::size().
|
inlineprivate |
Definition at line 278 of file mobileopengl2graphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and toGL.
|
inlineprivate |
Definition at line 313 of file mobileopengl2graphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and toGL.
|
inlineprivate |
Definition at line 1340 of file mobileopengl2graphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and EmoteDB::size().
|
inlineprivate |
Definition at line 1327 of file mobileopengl2graphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and EmoteDB::size().
|
virtual |
Reimplemented from Graphics.
Definition at line 1278 of file mobileopengl2graphics.cpp.
References FOR_EACH.
|
virtual |
Reimplemented from Graphics.
Definition at line 1287 of file mobileopengl2graphics.cpp.
References CAST_S32, GL_ARRAY_BUFFER, GL_STATIC_DRAW, and ImageVertexes::ogl.
|
virtual |
Reimplemented from Graphics.
Definition at line 158 of file mobileopengl2graphics.cpp.
References bindArrayBuffer(), ShadersManager::getGles2Program(), ShaderProgram::getProgramId(), graphicsManager, Logger::log(), GraphicsManager::logError(), logger, mAttributesBinded, mDrawTypeUniform, Graphics::mHeight, mPosAttrib, mProgram, mProgramId, mScreenUniform, mSimpleColorUniform, mTextureColorUniform, mTextureSizeUniform, mVao, mVbo, Graphics::mWidth, Logger::safeError(), and shaders.
Referenced by screenResized().
|
virtual |
|
virtual |
Reimplemented from Graphics.
Definition at line 212 of file mobileopengl2graphics.cpp.
References deleteGLObjects(), mAttributesBinded, Graphics::mColor, mVboBinded, and postInit().
|
virtual |
|
virtual |
Reimplemented from Graphics.
Definition at line 384 of file mobileopengl2graphics.cpp.
References graphicsManager, GraphicsManager::logError(), and mglDrawArrays.
|
private |
Definition at line 143 of file mobileopengl2graphics.h.
|
private |
Definition at line 160 of file mobileopengl2graphics.h.
Referenced by bindAttributes(), postInit(), and screenResized().
|
private |
Definition at line 161 of file mobileopengl2graphics.h.
Referenced by disableTexturingAndBlending().
|
private |
Definition at line 153 of file mobileopengl2graphics.h.
Referenced by disableTexturingAndBlending(), enableTexturingAndBlending(), and postInit().
|
private |
Definition at line 168 of file mobileopengl2graphics.h.
|
private |
Definition at line 140 of file mobileopengl2graphics.h.
Referenced by deleteArraysInternal().
|
private |
Definition at line 141 of file mobileopengl2graphics.h.
Referenced by deleteArraysInternal().
|
private |
Definition at line 146 of file mobileopengl2graphics.h.
|
private |
Definition at line 147 of file mobileopengl2graphics.h.
|
private |
Definition at line 150 of file mobileopengl2graphics.h.
Referenced by postInit().
|
private |
Definition at line 142 of file mobileopengl2graphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 148 of file mobileopengl2graphics.h.
Referenced by postInit().
|
private |
Definition at line 152 of file mobileopengl2graphics.h.
Referenced by postInit().
|
private |
Definition at line 149 of file mobileopengl2graphics.h.
Referenced by postInit().
|
private |
Definition at line 151 of file mobileopengl2graphics.h.
Referenced by postInit().
|
private |
Definition at line 162 of file mobileopengl2graphics.h.
Referenced by disableTexturingAndBlending(), and enableTexturingAndBlending().
|
staticprivate |
Definition at line 138 of file mobileopengl2graphics.h.
Referenced by bindTexture2().
|
staticprivate |
Definition at line 136 of file mobileopengl2graphics.h.
Referenced by bindTexture2(), and postInit().
|
staticprivate |
Definition at line 137 of file mobileopengl2graphics.h.
Referenced by bindTexture2().
|
private |
Definition at line 155 of file mobileopengl2graphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 158 of file mobileopengl2graphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 159 of file mobileopengl2graphics.h.
Referenced by bindAttributes(), and screenResized().
|
private |
Definition at line 144 of file mobileopengl2graphics.h.