summaryrefslogtreecommitdiff
path: root/src/render/mobileopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-25 20:25:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-25 20:25:38 +0300
commit104df5cae8521f4a234381567b19e6b4da3ff1f0 (patch)
tree2789b318f3f2d977bdd01921ae69c4f476954476 /src/render/mobileopenglgraphics.cpp
parentc456cb3f7eea27839c4b2689d77ddc09926fb8c6 (diff)
downloadmv-104df5cae8521f4a234381567b19e6b4da3ff1f0.tar.gz
mv-104df5cae8521f4a234381567b19e6b4da3ff1f0.tar.bz2
mv-104df5cae8521f4a234381567b19e6b4da3ff1f0.tar.xz
mv-104df5cae8521f4a234381567b19e6b4da3ff1f0.zip
Add restrict keyword to all renderers.
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r--src/render/mobileopenglgraphics.cpp46
1 files changed, 26 insertions, 20 deletions
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 11227325a..8ce7ddea3 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -101,7 +101,7 @@ MobileOpenGLGraphics::~MobileOpenGLGraphics()
deleteArraysInternal();
}
-void MobileOpenGLGraphics::postInit()
+void MobileOpenGLGraphics::postInit() restrict2
{
// glesTest();
}
@@ -157,15 +157,21 @@ bool MobileOpenGLGraphics::setVideoMode(const int w, const int h,
return setOpenGLMode();
}
-static inline 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_NONNULL(1);
-
-static inline 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 inline void drawQuad(const Image *restrict const image,
+ const int srcX,
+ const int srcY,
+ const int dstX,
+ const int dstY,
+ const int width,
+ const int height) A_NONNULL(1);
+
+static inline void drawQuad(const Image *restrict const image,
+ const int srcX,
+ const int srcY,
+ const int dstX,
+ const int dstY,
+ const int width,
+ const int height)
{
// if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D)
{
@@ -204,14 +210,14 @@ static inline void drawQuad(const Image *const image,
}
}
-static inline void drawRescaledQuad(const Image *const image,
+static inline void drawRescaledQuad(const Image *restrict 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_NONNULL(1);
-static inline void drawRescaledQuad(const Image *const image,
+static inline void drawRescaledQuad(const Image *restrict const image,
const int srcX, const int srcY,
const int dstX, const int dstY,
const int width, const int height,
@@ -1203,7 +1209,7 @@ void MobileOpenGLGraphics::bindTexture(const GLenum target,
}
}
-inline void MobileOpenGLGraphics::drawTriangleArrayfs(const int size)
+inline void MobileOpenGLGraphics::drawTriangleArrayfs(const int size) restrict2
{
glVertexPointer(2, GL_SHORT, 0, mShortVertArray);
glTexCoordPointer(2, GL_FLOAT, 0, mFloatTexArray);
@@ -1214,7 +1220,7 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfs(const int size)
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
}
-inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size)
+inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size) restrict2
{
glVertexPointer(2, GL_SHORT, 0, mShortVertArrayCached);
glTexCoordPointer(2, GL_FLOAT, 0, mFloatTexArrayCached);
@@ -1225,11 +1231,11 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size)
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
}
-inline void MobileOpenGLGraphics::drawTriangleArrayfs(const GLshort *const
- shortVertArray,
- const GLfloat *const
- floatTexArray,
- const int size)
+inline void MobileOpenGLGraphics::drawTriangleArrayfs(const GLshort *restrict
+ const shortVertArray,
+ const GLfloat *restrict
+ const floatTexArray,
+ const int size) restrict2
{
glVertexPointer(2, GL_SHORT, 0, shortVertArray);
glTexCoordPointer(2, GL_FLOAT, 0, floatTexArray);
@@ -1240,7 +1246,7 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfs(const GLshort *const
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
}
-inline void MobileOpenGLGraphics::drawLineArrays(const int size)
+inline void MobileOpenGLGraphics::drawLineArrays(const int size) restrict2
{
glVertexPointer(2, GL_SHORT, 0, mShortVertArray);