24 #if defined(USE_OPENGL) && !defined(__native_client__) && !defined(__SWITCH__)
33 #ifdef __native_client__
48 #define vertFill2D(tVar, vVar, x1, y1, x2, y2, dstX, dstY, w, h) \
61 vVar[vp + 0] = static_cast<GLshort>(dstX); \
62 vVar[vp + 1] = static_cast<GLshort>(dstY); \
63 vVar[vp + 2] = static_cast<GLshort>(dstX + w); \
64 vVar[vp + 3] = static_cast<GLshort>(dstY); \
65 vVar[vp + 4] = static_cast<GLshort>(dstX + w); \
66 vVar[vp + 5] = static_cast<GLshort>(dstY + h); \
67 vVar[vp + 6] = static_cast<GLshort>(dstX); \
68 vVar[vp + 7] = static_cast<GLshort>(dstY); \
69 vVar[vp + 8] = static_cast<GLshort>(dstX); \
70 vVar[vp + 9] = static_cast<GLshort>(dstY + h); \
71 vVar[vp + 10] = static_cast<GLshort>(dstX + w); \
72 vVar[vp + 11] = static_cast<GLshort>(dstY + h)
75 #ifdef DEBUG_DRAW_CALLS
76 unsigned int MobileOpenGLGraphics::mDrawCalls = 0;
77 unsigned int MobileOpenGLGraphics::mLastDrawCalls = 0;
94 #ifdef DEBUG_BIND_TEXTURE
101 mName =
"mobile OpenGL ES";
116 mMaxVertices = vertCount;
117 if (mMaxVertices < 500)
119 else if (mMaxVertices > 1024)
123 const size_t sz = mMaxVertices * 4 + 30;
125 if (mFloatTexArray ==
nullptr)
126 mFloatTexArray =
new GLfloat[sz];
127 if (mShortVertArray ==
nullptr)
128 mShortVertArray =
new GLshort[sz];
129 if (mFloatTexArrayCached ==
nullptr)
130 mFloatTexArrayCached =
new GLfloat[sz];
131 if (mShortVertArrayCached ==
nullptr)
132 mShortVertArrayCached =
new GLshort[sz];
170 return setOpenGLMode();
191 const float tw =
static_cast<float>(image->mTexWidth);
192 const float th =
static_cast<float>(image->mTexHeight);
194 const float texX1 =
static_cast<float>(srcX) / tw;
195 const float texY1 =
static_cast<float>(srcY) / th;
196 const float texX2 =
static_cast<float>(srcX + width) / tw;
197 const float texY2 =
static_cast<float>(srcY + height) / th;
209 static_cast<GLshort
>(dstX),
static_cast<GLshort
>(dstY),
210 static_cast<GLshort
>(dstX + width),
static_cast<GLshort
>(dstY),
211 static_cast<GLshort
>(dstX),
static_cast<GLshort
>(dstY + height),
212 static_cast<GLshort
>(dstX + width),
213 static_cast<GLshort
>(dstY + height)
216 glVertexPointer(2, GL_SHORT, 0, &vert);
217 glTexCoordPointer(2, GL_FLOAT, 0, &tex);
219 #ifdef DEBUG_DRAW_CALLS
220 MobileOpenGLGraphics::mDrawCalls ++;
230 const int srcX,
const int srcY,
231 const int dstX,
const int dstY,
232 const int width,
const int height,
233 const int desiredWidth,
234 const int desiredHeight)
238 const
int srcX, const
int srcY,
239 const
int dstX, const
int dstY,
240 const
int width, const
int height,
241 const
int desiredWidth,
242 const
int desiredHeight)
246 const float tw =
static_cast<float>(image->mTexWidth);
247 const float th =
static_cast<float>(image->mTexHeight);
249 const float texX1 =
static_cast<float>(srcX) / tw;
250 const float texY1 =
static_cast<float>(srcY) / th;
251 const float texX2 =
static_cast<float>(srcX + width) / tw;
252 const float texY2 =
static_cast<float>(srcY + height) / th;
264 static_cast<GLshort
>(dstX),
static_cast<GLshort
>(dstY),
265 static_cast<GLshort
>(dstX + desiredWidth),
266 static_cast<GLshort
>(dstY),
267 static_cast<GLshort
>(dstX),
static_cast<GLshort
>(
268 dstY + desiredHeight),
269 static_cast<GLshort
>(dstX + desiredWidth),
270 static_cast<GLshort
>(dstY + desiredHeight)
272 glVertexPointer(2, GL_SHORT, 0, &vert);
273 glTexCoordPointer(2, GL_FLOAT, 0, &tex);
275 #ifdef DEBUG_DRAW_CALLS
276 MobileOpenGLGraphics::mDrawCalls ++;
295 if (image ==
nullptr)
299 #ifdef DEBUG_BIND_TEXTURE
305 const SDL_Rect &imageRect = image->mBounds;
306 drawQuad(image, imageRect.x, imageRect.y,
307 dstX, dstY, imageRect.w, imageRect.h);
319 if (image ==
nullptr)
322 if (image->mGLImage != mImageCached)
325 mImageCached = image->mGLImage;
326 mAlphaCached = image->mAlpha;
329 const SDL_Rect &imageRect = image->mBounds;
330 const int srcX = imageRect.x;
331 const int srcY = imageRect.y;
332 const int w = imageRect.w;
333 const int h = imageRect.h;
335 if (w == 0 || h == 0)
338 const float tw =
static_cast<float>(image->mTexWidth);
339 const float th =
static_cast<float>(image->mTexHeight);
341 const unsigned int vLimit = mMaxVertices * 4;
343 unsigned int vp = mVpCached;
348 float texX1 =
static_cast<float>(srcX) / tw;
349 float texY1 =
static_cast<float>(srcY) / th;
350 float texX2 =
static_cast<float>(srcX + w) / tw;
351 float texY2 =
static_cast<float>(srcY + h) / th;
353 vertFill2D(mFloatTexArrayCached, mShortVertArrayCached,
354 texX1, texY1, texX2, texY2,
376 if (image ==
nullptr)
379 if (image->mGLImage != mImageCached)
382 mImageCached = image->mGLImage;
385 const SDL_Rect &imageRect = image->mBounds;
386 const int srcX = imageRect.x;
387 const int srcY = imageRect.y;
388 const int iw = imageRect.w;
389 const int ih = imageRect.h;
391 if (iw == 0 || ih == 0)
394 const float tw =
static_cast<float>(image->mTexWidth);
395 const float th =
static_cast<float>(image->mTexHeight);
397 unsigned int vp = mVpCached;
398 const unsigned int vLimit = mMaxVertices * 4;
399 const float texX1 =
static_cast<float>(srcX) / tw;
400 const float texY1 =
static_cast<float>(srcY) / th;
402 for (
int py = 0; py < h; py += ih)
404 const int height = (py + ih >= h) ? h - py : ih;
405 const float texY2 =
static_cast<float>(srcY + height) / th;
406 const int dstY =
y + py;
407 for (
int px = 0; px < w; px += iw)
409 const int width = (px + iw >= w) ? w - px : iw;
410 const int dstX =
x + px;
412 const float texX2 =
static_cast<float>(srcX + width) / tw;
414 vertFill2D(mFloatTexArrayCached, mShortVertArrayCached,
415 texX1, texY1, texX2, texY2,
416 dstX, dstY, width, height);
435 #ifdef DEBUG_BIND_TEXTURE
448 const int desiredWidth,
452 if (image ==
nullptr)
455 const SDL_Rect &imageRect = image->mBounds;
458 if (imageRect.w == desiredWidth && imageRect.h == desiredHeight)
465 #ifdef DEBUG_BIND_TEXTURE
473 imageRect.w, imageRect.h, desiredWidth, desiredHeight);
477 const int x,
const int y,
490 if (image ==
nullptr)
493 const SDL_Rect &imageRect = image->mBounds;
494 const
int srcX = imageRect.
x;
495 const
int srcY = imageRect.
y;
496 const
int iw = imageRect.w;
497 const
int ih = imageRect.h;
499 if (iw == 0 || ih == 0)
502 const
float tw = static_cast<
float>(image->mTexWidth);
503 const
float th = static_cast<
float>(image->mTexHeight);
507 #ifdef DEBUG_BIND_TEXTURE
515 const unsigned int vLimit = mMaxVertices * 4;
517 const float texX1 =
static_cast<float>(srcX) / tw;
518 const float texY1 =
static_cast<float>(srcY) / th;
520 for (
int py = 0; py < h; py += ih)
522 const int height = (py + ih >= h) ? h - py : ih;
523 const float texY2 =
static_cast<float>(srcY + height) / th;
524 const int dstY =
y + py;
525 for (
int px = 0; px < w; px += iw)
527 const int width = (px + iw >= w) ? w - px : iw;
528 const int dstX =
x + px;
530 const float texX2 =
static_cast<float>(srcX + width) / tw;
533 texX1, texY1, texX2, texY2,
534 dstX, dstY, width, height);
539 drawTriangleArrayfs(vp);
545 drawTriangleArrayfs(vp);
550 const int x,
const int y,
551 const int w,
const int h,
552 const int scaledWidth,
553 const int scaledHeight)
556 if (image ==
nullptr)
559 if (scaledWidth == 0 || scaledHeight == 0)
562 const SDL_Rect &imageRect = image->mBounds;
563 const int srcX = imageRect.x;
564 const int srcY = imageRect.y;
565 const int iw = imageRect.w;
566 const int ih = imageRect.h;
567 if (iw == 0 || ih == 0)
572 #ifdef DEBUG_BIND_TEXTURE
580 const unsigned int vLimit = mMaxVertices * 4;
583 const float tw =
static_cast<float>(image->mTexWidth);
584 const float th =
static_cast<float>(image->mTexHeight);
586 const float texX1 =
static_cast<float>(srcX) / tw;
587 const float texY1 =
static_cast<float>(srcY) / th;
589 const float tFractionW = iw / tw;
590 const float tFractionH = ih / th;
592 for (
int py = 0; py < h; py += scaledHeight)
594 const int height = (py + scaledHeight >= h)
595 ? h - py : scaledHeight;
596 const int dstY =
y + py;
597 const float visibleFractionH =
static_cast<float>(height)
599 const float texY2 = texY1 + tFractionH * visibleFractionH;
600 for (
int px = 0; px < w; px += scaledWidth)
602 const int width = (px + scaledWidth >= w)
603 ? w - px : scaledWidth;
604 const int dstX =
x + px;
605 const float visibleFractionW =
static_cast<float>(width)
607 const float texX2 = texX1 + tFractionW * visibleFractionW;
610 texX1, texY1, texX2, texY2,
611 dstX, dstY, width, height);
616 drawTriangleArrayfs(vp);
622 drawTriangleArrayfs(vp);
626 OpenGLGraphicsVertexes
629 const STD_VECTOR<GLshort*> &shortVertPool = ogl.mShortVertPool;
630 STD_VECTOR<GLshort*>::const_iterator iv;
631 const STD_VECTOR<GLshort*>::const_iterator iv_end = shortVertPool.end();
632 const STD_VECTOR<int> &vp = ogl.mVp;
633 STD_VECTOR<int>::const_iterator ivp;
634 const STD_VECTOR<int>::const_iterator ivp_end = vp.end();
639 const STD_VECTOR<GLfloat*> &floatTexPool = ogl.mFloatTexPool;
640 STD_VECTOR<GLfloat*>::const_iterator ft;
641 const STD_VECTOR<GLfloat*>::const_iterator
642 ft_end = floatTexPool.end();
644 for (iv = shortVertPool.begin(), ft = floatTexPool.begin(),
646 iv != iv_end && ft != ft_end && ivp != ivp_end;
647 ++ iv, ++ ft, ++ ivp)
649 drawTriangleArrayfs(*iv, *ft, *ivp);
672 if (image ==
nullptr || vert ==
nullptr)
675 const SDL_Rect &imageRect = image->mBounds;
676 const int srcX = imageRect.x;
677 const int srcY = imageRect.y;
678 const int iw = imageRect.w;
679 const int ih = imageRect.h;
681 if (iw == 0 || ih == 0)
684 const float tw =
static_cast<float>(image->mTexWidth);
685 const float th =
static_cast<float>(image->mTexHeight);
687 const unsigned int vLimit = mMaxVertices * 4;
689 OpenGLGraphicsVertexes &ogl = vert->ogl;
690 unsigned int vp = ogl.continueVp();
695 const float texX1 =
static_cast<float>(srcX) / tw;
696 const float texY1 =
static_cast<float>(srcY) / th;
698 GLfloat *floatTexArray = ogl.continueFloatTexArray();
699 GLshort *shortVertArray = ogl.continueShortVertArray();
701 for (
int py = 0; py < h; py += ih)
703 const int height = (py + ih >= h) ? h - py : ih;
704 const int dstY =
y + py;
705 const float texY2 =
static_cast<float>(srcY + height) / th;
706 for (
int px = 0; px < w; px += iw)
708 const int width = (px + iw >= w) ? w - px : iw;
709 const int dstX =
x + px;
710 const float texX2 =
static_cast<float>(srcX + width) / tw;
713 texX1, texY1, texX2, texY2,
714 dstX, dstY, width, height);
719 floatTexArray = ogl.switchFloatTexArray();
720 shortVertArray = ogl.switchShortVertArray();
736 if (vertCol ==
nullptr || image ==
nullptr)
738 if (vertCol->currentGLImage != image->mGLImage)
741 vertCol->currentGLImage = image->mGLImage;
742 vertCol->currentVert = vert;
744 vertCol->draws.push_back(vert);
765 #ifdef DEBUG_BIND_TEXTURE
781 if (vertCol ==
nullptr || image ==
nullptr)
784 if (vertCol->currentGLImage != image->mGLImage)
787 vertCol->currentGLImage = image->mGLImage;
788 vertCol->currentVert = vert;
790 vertCol->draws.push_back(vert);
794 vert = vertCol->currentVert;
814 const SDL_Rect &imageRect = image->mBounds;
815 const int srcX = imageRect.x;
816 const int srcY = imageRect.y;
817 const int w = imageRect.w;
818 const int h = imageRect.h;
820 if (w == 0 || h == 0)
823 const float tw =
static_cast<float>(image->mTexWidth);
824 const float th =
static_cast<float>(image->mTexHeight);
826 const unsigned int vLimit = mMaxVertices * 4;
828 OpenGLGraphicsVertexes &ogl = vert->
ogl;
831 unsigned int vp = ogl.continueVp();
836 float texX1 =
static_cast<float>(srcX) / tw;
837 float texY1 =
static_cast<float>(srcY) / th;
838 float texX2 =
static_cast<float>(srcX + w) / tw;
839 float texY2 =
static_cast<float>(srcY + h) / th;
841 GLfloat *
const floatTexArray = ogl.continueFloatTexArray();
842 GLshort *
const shortVertArray = ogl.continueShortVertArray();
845 texX1, texY1, texX2, texY2,
851 ogl.switchFloatTexArray();
852 ogl.switchShortVertArray();
868 #ifdef DEBUG_BIND_TEXTURE
877 const int x,
const int y,
878 const int w,
const int h,
883 const Image *
const image = imgRect.grid[4];
884 if (image ==
nullptr)
886 if (vertCol->currentGLImage != image->mGLImage)
889 vertCol->currentGLImage = image->mGLImage;
890 vertCol->currentVert = vert;
892 vertCol->draws.push_back(vert);
896 vert = vertCol->currentVert;
907 #ifdef DEBUG_DRAW_CALLS
908 mLastDrawCalls = mDrawCalls;
915 SDL_GL_SwapBuffers();
919 mglFrameTerminator();
927 glMatrixMode(GL_TEXTURE);
930 glMatrixMode(GL_PROJECTION);
934 glOrthof(0.0,
static_cast<float>(
mRect.w),
935 static_cast<float>(
mRect.h),
939 glOrtho(0.0,
static_cast<double>(
mRect.w),
940 static_cast<double>(
mRect.h),
944 glMatrixMode(GL_MODELVIEW);
952 glShadeModel(GL_FLAT);
954 glEnableClientState(GL_VERTEX_ARRAY);
955 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
958 mglHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
959 mglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
960 mglHint(GL_POINT_SMOOTH_HINT, GL_FASTEST);
961 mglHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);
977 if (!mClipStack.empty())
979 const ClipRect &clipArea = mClipStack.top();
986 const ClipRect &clipArea = mClipStack.top();
990 if (transX != 0 || transY != 0)
992 glTranslatef(
static_cast<GLfloat
>(transX),
993 static_cast<GLfloat
>(transY), 0);
996 (mRect.h - clipArea.
y - clipArea.
height) * mScale,
997 clipArea.
width * mScale,
998 clipArea.
height * mScale);
1007 int transX = -clipArea1.
xOffset;
1008 int transY = -clipArea1.
yOffset;
1018 if (transX != 0 || transY != 0)
1020 glTranslatef(
static_cast<GLfloat
>(transX),
1021 static_cast<GLfloat
>(transY), 0);
1054 mShortVertArray[0] =
static_cast<GLshort
>(x1);
1055 mShortVertArray[1] =
static_cast<GLshort
>(y1);
1056 mShortVertArray[2] =
static_cast<GLshort
>(x2);
1057 mShortVertArray[3] =
static_cast<GLshort
>(y2);
1077 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
1105 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
1117 const GLshort
x = static_cast<GLshort>(rect.
x);
1118 const GLshort
y = static_cast<GLshort>(rect.
y);
1119 const GLshort width = static_cast<GLshort>(rect.width);
1120 const GLshort height = static_cast<GLshort>(rect.height);
1121 const GLshort xw = static_cast<GLshort>(rect.
x + width);
1122 const GLshort yh = static_cast<GLshort>(rect.
y + height);
1134 glVertexPointer(2, GL_SHORT, 0, &vert);
1135 #ifdef DEBUG_DRAW_CALLS
1154 glVertexPointer(2, GL_SHORT, 0, &vert);
1155 #ifdef DEBUG_DRAW_CALLS
1168 const int x2,
const int y2,
1169 const int width,
const int height)
restrict2
1171 unsigned int vp = 0;
1172 const unsigned int vLimit = mMaxVertices * 4;
1177 const GLshort xs1 =
static_cast<GLshort
>(x1);
1178 const GLshort xs2 =
static_cast<GLshort
>(x2);
1179 const GLshort ys1 =
static_cast<GLshort
>(y1);
1180 const GLshort ys2 =
static_cast<GLshort
>(y2);
1181 const int16_t width1 =
CAST_S16(width);
1182 const int16_t height1 =
CAST_S16(height);
1184 for (int16_t
y =
CAST_S16(y1);
y < y2;
y += height1)
1186 mShortVertArray[vp + 0] = xs1;
1187 mShortVertArray[vp + 1] =
y;
1189 mShortVertArray[vp + 2] = xs2;
1190 mShortVertArray[vp + 3] =
y;
1200 for (int16_t
x =
CAST_S16(x1);
x < x2;
x += width1)
1202 mShortVertArray[vp + 0] =
x;
1203 mShortVertArray[vp + 1] = ys1;
1205 mShortVertArray[vp + 2] =
x;
1206 mShortVertArray[vp + 3] = ys2;
1221 const GLuint texture)
1232 glVertexPointer(2, GL_SHORT, 0, mShortVertArray);
1233 glTexCoordPointer(2, GL_FLOAT, 0, mFloatTexArray);
1235 #ifdef DEBUG_DRAW_CALLS
1248 glVertexPointer(2, GL_SHORT, 0, mShortVertArrayCached);
1249 glTexCoordPointer(2, GL_FLOAT, 0, mFloatTexArrayCached);
1251 #ifdef DEBUG_DRAW_CALLS
1262 const shortVertArray,
1264 const floatTexArray,
1267 glVertexPointer(2, GL_SHORT, 0, shortVertArray);
1268 glTexCoordPointer(2, GL_FLOAT, 0, floatTexArray);
1270 #ifdef DEBUG_DRAW_CALLS
1282 glVertexPointer(2, GL_SHORT, 0, mShortVertArray);
1284 #ifdef DEBUG_DRAW_CALLS
1299 for (
int f = 0; f < 65535; f ++)
1306 if (test[0] != 0 || test[1] != 0 || test[2] != 0 || test[3] != 0)
1309 test[0], test[1], test[2], test[3]);
1316 if (!mIsByteColor && mFloatColor == alpha)
1319 glColor4f(1.0F, 1.0F, 1.0F, alpha);
1320 mIsByteColor =
false;
1321 mFloatColor = alpha;
1329 glColor4ub(
static_cast<GLubyte
>(
mColor.
r),
1330 static_cast<GLubyte
>(
mColor.
g),
1331 static_cast<GLubyte
>(
mColor.
b),
1332 static_cast<GLubyte
>(
mColor.
a));
1338 const int w,
const int h,
1346 const int x,
const int y,
1347 const int w,
const int h,
1357 GL_DEPTH_BUFFER_BIT |
1358 GL_STENCIL_BUFFER_BIT);
1361 #ifdef DEBUG_BIND_TEXTURE
1365 const std::string texture = image->mIdPath;
1366 if (mOldTexture != texture)
1368 if ((!mOldTexture.empty() || !texture.empty())
1369 && mOldTextureId != image->mGLImage)
1371 logger->
log(
"bind: %s (%d) to %s (%d)", mOldTexture.c_str(),
1372 mOldTextureId, texture.c_str(), image->mGLImage);
1374 mOldTextureId = image->mGLImage;
1375 mOldTexture = texture;
virtual void updateScreen()=0
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void popClipArea()
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 drawTileCollection(const ImageCollection *const vertCol)=0
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
virtual void fillRectangle(const Rect &rectangle)=0
virtual void calcTileCollection(ImageCollection *const vertCol, const Image *const image, int x, int y)=0
virtual void drawImageCached(const Image *const image, int srcX, int srcY)=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 deleteArrays()
virtual void drawRectangle(const Rect &rectangle)=0
MStack< ClipRect > mClipStack
virtual void calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0
virtual void drawLine(int x1, int y1, int x2, int y2)=0
virtual void calcTileVertexes(ImageVertexes *const vert, const Image *const image, int x, int y) const =0
virtual void drawPattern(const Image *const image, const int x, const int y, const int w, const int h)=0
virtual void initArrays(const int vertCount)
virtual void clearScreen() const
virtual void drawPoint(int x, int y)=0
virtual void drawImageRect(const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0
virtual void copyImage(const Image *const image, int dstX, int dstY)=0
virtual void pushClipArea(const Rect &area)
virtual void drawTileVertexes(const ImageVertexes *const vert)=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
virtual void drawNet(const int x1, const int y1, const int x2, const int y2, const int width, const int height)
virtual void drawRescaledImage(const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight)=0
OpenGLGraphicsVertexes ogl
void log(const char *const log_text,...)
GLshort * mShortVertArray
GLfloat * mFloatTexArrayCached
void drawLineArrays(const int size) A_INLINE
void drawTriangleArrayfs(const GLshort *const shortVertArray, const GLfloat *const floatTexArray, const int size) A_INLINE
void drawTriangleArrayfsCached(const int size) A_INLINE
GLshort * mShortVertArrayCached
void calcPatternInline(ImageVertexes *restrict const vert, const Image *restrict const image, const int x, const int y, const int w, const int h) const restrict2 A_INLINE
void drawPatternInline(const Image *restrict const image, const int x, const int y, const int w, const int h) restrict2 A_INLINE
void drawRectangle(const Rect &restrict rect) restrict2 override final
void void drawImageInline(const Image *restrict const image, int dstX, int dstY) restrict2 A_INLINE
void calcTileVertexesInline(ImageVertexes *restrict const vert, const Image *restrict const image, int x, int y) const restrict2 A_INLINE A_NONNULL(2
void calcImageRect(ImageVertexes *restrict const vert, int x, int y, int w, int h, const ImageRect &restrict imgRect) restrict2 A_INLINE
void completeCache() restrict2 override final
GraphicsManager graphicsManager
std::vector< ImageVertexes * > ImageVertexesVector
ImageVertexesVector::const_iterator ImageCollectionCIter
#define mglDrawArrays(...)
#define mglBindTexture(...)
#define mglGetIntegerv(...)
#define isGLNotNull(func)
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
#define vertFill2D(tVar, vVar, x1, y1, x2, y2, dstX, dstY, w, h)
void enableTexturingAndBlending() restrict2
static GLuint mTextureBinded
void disableTexturingAndBlending() restrict2
static void dumpSettings()
static void bindTexture(const GLenum target, const GLuint texture)
void restoreColor() restrict2 A_INLINE
void setColorAlpha(const float alpha) restrict2 A_INLINE
void deleteArraysInternal() restrict2
void drawVertexes(const OpenGLGraphicsVertexes &restrict ogl) restrict2 A_INLINE
void debugBindTexture(const Image *restrict const image) restrict2
unsigned int vertexBufSize
#define FUNC_BLOCK(name, id)
#define BLOCK_START(name)