ManaPlus
Functions
nullopenglgraphics.cpp File Reference

(986a3bf)

#include "render/nullopenglgraphics.h"
#include "render/vertexes/imagecollection.h"
#include "resources/imagerect.h"
#include "resources/openglimagehelper.h"
#include "resources/image/image.h"
#include "debug.h"
#include "render/graphics_drawImageRect.hpp"
#include "render/graphics_calcImageRect.hpp"

Go to the source code of this file.

Functions

static void drawQuad (const Image *const image, const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height)
 
static void drawRescaledQuad (const Image *const image, const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight)
 

Function Documentation

◆ drawQuad()

static void drawQuad ( const Image *const  image,
const int  srcX,
const int  srcY,
const int  dstX,
const int  dstY,
const int  width,
const int  height 
)
inlinestatic

Definition at line 124 of file nullopenglgraphics.cpp.

129 {
130  if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D)
131  {
132 #ifdef DEBUG_DRAW_CALLS
133  NullOpenGLGraphics::mDrawCalls ++;
134 #endif // DEBUG_DRAW_CALLS
135  }
136  else
137  {
138 #ifdef DEBUG_DRAW_CALLS
139  NullOpenGLGraphics::mDrawCalls ++;
140 #endif // DEBUG_DRAW_CALLS
141  }
142 }

References OpenGLImageHelper::mTextureType.

◆ drawRescaledQuad()

static void drawRescaledQuad ( const Image *const  image,
const int  srcX,
const int  srcY,
const int  dstX,
const int  dstY,
const int  width,
const int  height,
const int  desiredWidth,
const int  desiredHeight 
)
inlinestatic

Definition at line 144 of file nullopenglgraphics.cpp.

153 {
154  if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D)
155  {
156 #ifdef DEBUG_DRAW_CALLS
157  NullOpenGLGraphics::mDrawCalls ++;
158 #endif // DEBUG_DRAW_CALLS
159  }
160  else
161  {
162 #ifdef DEBUG_DRAW_CALLS
163  NullOpenGLGraphics::mDrawCalls ++;
164 #endif // DEBUG_DRAW_CALLS
165  }
166 }

References OpenGLImageHelper::mTextureType.