ManaPlus
Public Member Functions | Private Attributes
NullOpenGLGraphics Class Reference

#include <nullopenglgraphics.h>

Inheritance diagram for NullOpenGLGraphics:
Graphics

Public Member Functions

 NullOpenGLGraphics ()
 
 ~NullOpenGLGraphics ()
 
void drawQuadArrayfi (const int size) A_INLINE
 
void drawQuadArrayfi (const GLint *const intVertArray, const GLfloat *const floatTexArray, const int size) A_INLINE
 
void drawQuadArrayii (const int size) A_INLINE
 
void drawQuadArrayii (const GLint *const intVertArray, const GLint *const intTexArray, const int size) A_INLINE
 
void drawLineArrayi (const int size) A_INLINE
 
void drawLineArrayf (const int size) A_INLINE
 
- 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)
 
ClipRectgetTopClip () 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)
 
virtual void setColor (const Color &color)
 
const ColorgetColor () 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 createGLContext (const bool custom)
 
virtual void drawPoint (int x, int y)=0
 
virtual void beginDraw ()
 
virtual void endDraw ()
 
virtual void clearScreen () const
 
virtual void deleteArrays ()
 
virtual void postInit ()
 
virtual void finalize (ImageCollection *const col)
 
virtual void finalize (ImageVertexes *const vert)
 
virtual void testDraw ()
 
virtual void removeArray (const uint32_t sz, uint32_t *const arr)
 
virtual void screenResized ()
 

Private Attributes

GLfloat * mFloatTexArray
 
GLint * mIntTexArray
 
GLint * mIntVertArray
 
bool mTexture
 
bool mIsByteColor
 
Color mByteColor
 
float mFloatColor
 
int mMaxVertices
 
bool mColorAlpha
 
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< ClipRectmClipStack
 
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
 

Detailed Description

Definition at line 63 of file nullopenglgraphics.h.

Constructor & Destructor Documentation

◆ NullOpenGLGraphics()

NullOpenGLGraphics::NullOpenGLGraphics ( )

Definition at line 47 of file nullopenglgraphics.cpp.

47  :
48  mFloatTexArray(nullptr),
49  mIntTexArray(nullptr),
50  mIntVertArray(nullptr),
51  mTexture(false),
52  mIsByteColor(false),
53  mByteColor(),
54  mFloatColor(1.0F),
55  mMaxVertices(500),
56  mColorAlpha(false),
57 #ifdef DEBUG_BIND_TEXTURE
58  mOldTexture(),
59  mOldTextureId(0),
60 #endif // DEBUG_BIND_TEXTURE
61  mFbo()
62 {
64  mName = "null OpenGL";
65 }
RenderType mOpenGL
Definition: graphics.h:545
std::string mName
Definition: graphics.h:549
@ RENDER_NULL
Definition: rendertype.h:34

References Graphics::mName, Graphics::mOpenGL, and RENDER_NULL.

◆ ~NullOpenGLGraphics()

NullOpenGLGraphics::~NullOpenGLGraphics ( )

Definition at line 67 of file nullopenglgraphics.cpp.

68 {
69  delete [] mFloatTexArray;
70  delete [] mIntTexArray;
71  delete [] mIntVertArray;
72 }

References mFloatTexArray, mIntTexArray, and mIntVertArray.

Member Function Documentation

◆ drawLineArrayf()

void NullOpenGLGraphics::drawLineArrayf ( const int  size)
inline

Definition at line 1177 of file nullopenglgraphics.cpp.

1179 {
1180 #ifdef DEBUG_DRAW_CALLS
1181  mDrawCalls ++;
1182 #endif // DEBUG_DRAW_CALLS
1183 }

◆ drawLineArrayi()

void NullOpenGLGraphics::drawLineArrayi ( const int  size)
inline

Definition at line 1169 of file nullopenglgraphics.cpp.

1171 {
1172 #ifdef DEBUG_DRAW_CALLS
1173  mDrawCalls ++;
1174 #endif // DEBUG_DRAW_CALLS
1175 }

◆ drawQuadArrayfi() [1/2]

void NullOpenGLGraphics::drawQuadArrayfi ( const GLint *const  intVertArray,
const GLfloat *const  floatTexArray,
const int  size 
)
inline

Definition at line 1137 of file nullopenglgraphics.cpp.

1143 {
1144 #ifdef DEBUG_DRAW_CALLS
1145  mDrawCalls ++;
1146 #endif // DEBUG_DRAW_CALLS
1147 }

◆ drawQuadArrayfi() [2/2]

void NullOpenGLGraphics::drawQuadArrayfi ( const int  size)
inline

Definition at line 1129 of file nullopenglgraphics.cpp.

1131 {
1132 #ifdef DEBUG_DRAW_CALLS
1133  mDrawCalls ++;
1134 #endif // DEBUG_DRAW_CALLS
1135 }

◆ drawQuadArrayii() [1/2]

void NullOpenGLGraphics::drawQuadArrayii ( const GLint *const  intVertArray,
const GLint *const  intTexArray,
const int  size 
)
inline

Definition at line 1157 of file nullopenglgraphics.cpp.

1163 {
1164 #ifdef DEBUG_DRAW_CALLS
1165  mDrawCalls ++;
1166 #endif // DEBUG_DRAW_CALLS
1167 }

◆ drawQuadArrayii() [2/2]

void NullOpenGLGraphics::drawQuadArrayii ( const int  size)
inline

Definition at line 1149 of file nullopenglgraphics.cpp.

1151 {
1152 #ifdef DEBUG_DRAW_CALLS
1153  mDrawCalls ++;
1154 #endif // DEBUG_DRAW_CALLS
1155 }

Field Documentation

◆ mByteColor

Color NullOpenGLGraphics::mByteColor
private

Definition at line 108 of file nullopenglgraphics.h.

◆ mColorAlpha

bool NullOpenGLGraphics::mColorAlpha
private

Definition at line 111 of file nullopenglgraphics.h.

◆ mFbo

FBOInfo NullOpenGLGraphics::mFbo
private

Definition at line 116 of file nullopenglgraphics.h.

◆ mFloatColor

float NullOpenGLGraphics::mFloatColor
private

Definition at line 109 of file nullopenglgraphics.h.

◆ mFloatTexArray

GLfloat* NullOpenGLGraphics::mFloatTexArray
private

Definition at line 102 of file nullopenglgraphics.h.

Referenced by ~NullOpenGLGraphics().

◆ mIntTexArray

GLint* NullOpenGLGraphics::mIntTexArray
private

Definition at line 103 of file nullopenglgraphics.h.

Referenced by ~NullOpenGLGraphics().

◆ mIntVertArray

GLint* NullOpenGLGraphics::mIntVertArray
private

Definition at line 104 of file nullopenglgraphics.h.

Referenced by ~NullOpenGLGraphics().

◆ mIsByteColor

bool NullOpenGLGraphics::mIsByteColor
private

Definition at line 107 of file nullopenglgraphics.h.

◆ mMaxVertices

int NullOpenGLGraphics::mMaxVertices
private

Definition at line 110 of file nullopenglgraphics.h.

◆ mTexture

bool NullOpenGLGraphics::mTexture
private

Definition at line 105 of file nullopenglgraphics.h.


The documentation for this class was generated from the following files: