(986a3bf)
Go to the source code of this file.
|
#define | vertFill2D(tVar, vVar, x1, y1, x2, y2, dstX, dstY, w, h) |
|
#define | vertFillNv(tVar, vVar, srcX, srcY, dstX, dstY, w, h) |
|
|
static void | bindPointerIntFloat (const GLint *const vert, const GLfloat *const tex) A_INLINE |
|
static void | bindPointerInt (const GLint *const vert, const GLint *const tex) A_INLINE |
|
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) A_INLINE |
|
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) A_INLINE |
|
◆ vertFill2D
#define vertFill2D |
( |
|
tVar, |
|
|
|
vVar, |
|
|
|
x1, |
|
|
|
y1, |
|
|
|
x2, |
|
|
|
y2, |
|
|
|
dstX, |
|
|
|
dstY, |
|
|
|
w, |
|
|
|
h |
|
) |
| |
Value: tVar[vp + 0] = x1; \
tVar[vp + 1] = y1; \
tVar[vp + 2] = x2; \
tVar[vp + 3] = y1; \
tVar[vp + 4] = x2; \
tVar[vp + 5] = y2; \
tVar[vp + 6] = x1; \
tVar[vp + 7] = y2; \
vVar[vp + 0] = dstX; \
vVar[vp + 1] = dstY; \
vVar[vp + 2] = dstX + w; \
vVar[vp + 3] = dstY; \
vVar[vp + 4] = dstX + w; \
vVar[vp + 5] = dstY + h; \
vVar[vp + 6] = dstX; \
vVar[vp + 7] = dstY + h
Definition at line 48 of file normalopenglgraphics.cpp.
◆ vertFillNv
#define vertFillNv |
( |
|
tVar, |
|
|
|
vVar, |
|
|
|
srcX, |
|
|
|
srcY, |
|
|
|
dstX, |
|
|
|
dstY, |
|
|
|
w, |
|
|
|
h |
|
) |
| |
Value: tVar[vp + 0] = srcX; \
tVar[vp + 1] = srcY; \
tVar[vp + 2] = srcX + w; \
tVar[vp + 3] = srcY; \
tVar[vp + 4] = srcX + w; \
tVar[vp + 5] = srcY + h; \
tVar[vp + 6] = srcX; \
tVar[vp + 7] = srcY + h; \
vVar[vp + 0] = dstX; \
vVar[vp + 1] = dstY; \
vVar[vp + 2] = dstX + w; \
vVar[vp + 3] = dstY; \
vVar[vp + 4] = dstX + w; \
vVar[vp + 5] = dstY + h; \
vVar[vp + 6] = dstX; \
vVar[vp + 7] = dstY + h
Definition at line 67 of file normalopenglgraphics.cpp.
◆ bindPointerInt()
static void bindPointerInt |
( |
const GLint *const |
vert, |
|
|
const GLint *const |
tex |
|
) |
| |
|
inlinestatic |
Definition at line 216 of file normalopenglgraphics.cpp.
222 glVertexPointer(2, GL_INT, 0, vert);
223 glTexCoordPointer(2, GL_INT, 0, tex);
References anonymous_namespace{normalopenglgraphics.cpp}::vertPtr.
Referenced by drawQuad(), NormalOpenGLGraphics::drawQuadArrayii(), NormalOpenGLGraphics::drawQuadArrayiiCached(), drawRescaledQuad(), and NormalOpenGLGraphics::testDraw().
◆ bindPointerIntFloat()
static void bindPointerIntFloat |
( |
const GLint *const |
vert, |
|
|
const GLfloat *const |
tex |
|
) |
| |
|
inlinestatic |
Definition at line 202 of file normalopenglgraphics.cpp.
208 glVertexPointer(2, GL_INT, 0, vert);
209 glTexCoordPointer(2, GL_FLOAT, 0, tex);
References anonymous_namespace{normalopenglgraphics.cpp}::vertPtr.
Referenced by drawQuad(), NormalOpenGLGraphics::drawQuadArrayfi(), NormalOpenGLGraphics::drawQuadArrayfiCached(), drawRescaledQuad(), and NormalOpenGLGraphics::testDraw().
◆ 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 233 of file normalopenglgraphics.cpp.
240 const float tw =
static_cast<float>(image->mTexWidth);
241 const float th =
static_cast<float>(image->mTexHeight);
243 const float texX1 =
static_cast<float>(srcX) / tw;
244 const float texY1 =
static_cast<float>(srcY) / th;
245 const float texX2 =
static_cast<float>(srcX + width) / tw;
246 const float texY2 =
static_cast<float>(srcY + height) / th;
260 dstX + width, dstY + height,
265 #ifdef DEBUG_DRAW_CALLS
266 NormalOpenGLGraphics::mDrawCalls ++;
269 glDrawArrays(GL_QUADS, 0, 4);
280 srcX + width, srcY + height,
287 dstX + width, dstY + height,
292 #ifdef DEBUG_DRAW_CALLS
293 NormalOpenGLGraphics::mDrawCalls ++;
296 glDrawArrays(GL_QUADS, 0, 4);
GraphicsManager graphicsManager
static void bindPointerIntFloat(const GLint *const vert, const GLfloat *const tex) A_INLINE
static void bindPointerInt(const GLint *const vert, const GLint *const tex) A_INLINE
References bindPointerInt(), bindPointerIntFloat(), graphicsManager, GraphicsManager::logError(), and 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 311 of file normalopenglgraphics.cpp.
320 const float tw =
static_cast<float>(image->mTexWidth);
321 const float th =
static_cast<float>(image->mTexHeight);
323 const float texX1 =
static_cast<float>(srcX) / tw;
324 const float texY1 =
static_cast<float>(srcY) / th;
325 const float texX2 =
static_cast<float>(srcX + width) / tw;
326 const float texY2 =
static_cast<float>(srcY + height) / th;
339 dstX + desiredWidth, dstY,
340 dstX + desiredWidth, dstY + desiredHeight,
341 dstX, dstY + desiredHeight
345 #ifdef DEBUG_DRAW_CALLS
346 NormalOpenGLGraphics::mDrawCalls ++;
349 glDrawArrays(GL_QUADS, 0, 4);
360 srcX + width, srcY + height,
366 dstX + desiredWidth, dstY,
367 dstX + desiredWidth, dstY + desiredHeight,
368 dstX, dstY + desiredHeight
372 #ifdef DEBUG_DRAW_CALLS
373 NormalOpenGLGraphics::mDrawCalls ++;
376 glDrawArrays(GL_QUADS, 0, 4);
References bindPointerInt(), bindPointerIntFloat(), graphicsManager, GraphicsManager::logError(), and OpenGLImageHelper::mTextureType.