![]() |
ManaPlus
|
#include <modernopenglgraphics.h>
Public Member Functions | |
| ModernOpenGLGraphics () | |
| ~ModernOpenGLGraphics () | |
| 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 GLint *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 |
| void | bindElementBuffer (const GLuint ebo) A_INLINE |
Private Attributes | |
| GLint * | mIntArray |
| GLint * | mIntArrayCached |
| 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 | mEbo |
| GLuint | mVboBinded |
| GLuint | mEboBinded |
| GLuint | mAttributesBinded |
| bool | mColorAlpha |
| bool | mTextureDraw |
| FBOInfo | mFbo |
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 65 of file modernopenglgraphics.h.
| ModernOpenGLGraphics::ModernOpenGLGraphics | ( | ) |
Definition at line 90 of file modernopenglgraphics.cpp.
References Graphics::mName, Graphics::mOpenGL, and RENDER_MODERN_OPENGL.
| ModernOpenGLGraphics::~ModernOpenGLGraphics | ( | ) |
Definition at line 122 of file modernopenglgraphics.cpp.
References deleteArraysInternal(), and deleteGLObjects().
|
inlineprivate |
Definition at line 1154 of file modernopenglgraphics.cpp.
References GL_ARRAY_BUFFER.
Referenced by postInit().
|
inlineprivate |
|
inlineprivate |
Definition at line 1212 of file modernopenglgraphics.cpp.
References mAttributesBinded, and mVboBinded.
|
inlineprivate |
Definition at line 1169 of file modernopenglgraphics.cpp.
References GL_ELEMENT_ARRAY_BUFFER, Logger::log(), and logger.
Referenced by postInit().
|
virtual |
Reimplemented from Graphics.
Definition at line 1267 of file modernopenglgraphics.cpp.
References Graphics::createGLContext(), SDL::createGLContext(), and SDL::makeCurrentContext().
|
private |
Definition at line 128 of file modernopenglgraphics.cpp.
References delete2, mEbo, mProgram, mVao, and mVbo.
Referenced by screenResized(), and ~ModernOpenGLGraphics().
|
inlineprivate |
Definition at line 1368 of file modernopenglgraphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, mIntArray, and EmoteDB::size().
|
inlineprivate |
Definition at line 280 of file modernopenglgraphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), and mglDrawArrays.
|
inlineprivate |
Definition at line 312 of file modernopenglgraphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), and mglDrawArrays.
|
inlineprivate |
Definition at line 1353 of file modernopenglgraphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and EmoteDB::size().
|
inlineprivate |
Definition at line 1339 of file modernopenglgraphics.cpp.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, graphicsManager, GraphicsManager::logError(), mglDrawArrays, and EmoteDB::size().
|
virtual |
Reimplemented from Graphics.
Definition at line 1282 of file modernopenglgraphics.cpp.
References FOR_EACH.
|
virtual |
Reimplemented from Graphics.
Definition at line 1291 of file modernopenglgraphics.cpp.
References CAST_S32, GL_ARRAY_BUFFER, GL_STATIC_DRAW, and ImageVertexes::ogl.
|
virtual |
Reimplemented from Graphics.
Definition at line 162 of file modernopenglgraphics.cpp.
References bindArrayBuffer(), bindElementBuffer(), Logger::error(), ShaderProgram::getProgramId(), ShadersManager::getSimpleProgram(), graphicsManager, Logger::log(), GraphicsManager::logError(), logger, mAttributesBinded, mDrawTypeUniform, mEbo, Graphics::mHeight, mPosAttrib, mProgram, mProgramId, mScreenUniform, mSimpleColorUniform, mTextureColorUniform, mVao, mVbo, Graphics::mWidth, Logger::safeError(), and shaders.
Referenced by screenResized().
|
virtual |
|
virtual |
Reimplemented from Graphics.
Definition at line 213 of file modernopenglgraphics.cpp.
References deleteGLObjects(), mAttributesBinded, Graphics::mColor, mEboBinded, mVboBinded, and postInit().
|
virtual |
|
virtual |
Reimplemented from Graphics.
Definition at line 377 of file modernopenglgraphics.cpp.
References graphicsManager, GraphicsManager::logError(), and mglDrawArrays.
|
private |
Definition at line 139 of file modernopenglgraphics.h.
|
private |
Definition at line 155 of file modernopenglgraphics.h.
Referenced by bindAttributes(), postInit(), and screenResized().
|
private |
Definition at line 156 of file modernopenglgraphics.h.
|
private |
Definition at line 149 of file modernopenglgraphics.h.
Referenced by postInit().
|
private |
Definition at line 152 of file modernopenglgraphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 154 of file modernopenglgraphics.h.
Referenced by screenResized().
|
private |
Definition at line 163 of file modernopenglgraphics.h.
|
private |
Definition at line 142 of file modernopenglgraphics.h.
|
private |
Definition at line 136 of file modernopenglgraphics.h.
Referenced by drawLineArrays().
|
private |
Definition at line 137 of file modernopenglgraphics.h.
|
private |
Definition at line 143 of file modernopenglgraphics.h.
|
private |
Definition at line 146 of file modernopenglgraphics.h.
Referenced by postInit().
|
private |
Definition at line 138 of file modernopenglgraphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 144 of file modernopenglgraphics.h.
Referenced by postInit().
|
private |
Definition at line 148 of file modernopenglgraphics.h.
Referenced by postInit().
|
private |
Definition at line 145 of file modernopenglgraphics.h.
Referenced by postInit().
|
private |
Definition at line 147 of file modernopenglgraphics.h.
Referenced by postInit().
|
private |
Definition at line 157 of file modernopenglgraphics.h.
|
private |
Definition at line 150 of file modernopenglgraphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 151 of file modernopenglgraphics.h.
Referenced by deleteGLObjects(), and postInit().
|
private |
Definition at line 153 of file modernopenglgraphics.h.
Referenced by bindAttributes(), and screenResized().
|
private |
Definition at line 140 of file modernopenglgraphics.h.