diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-25 01:14:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-25 01:14:37 +0300 |
commit | ce28ac8bfcea7ea926fa132a23f7814682dca0dc (patch) | |
tree | d4edf63b01bb9e80638be2caa7d596e17a17a248 /src | |
parent | f0f4f43d1263f946be23b75de4de28a4731cc93a (diff) | |
download | plus-ce28ac8bfcea7ea926fa132a23f7814682dca0dc.tar.gz plus-ce28ac8bfcea7ea926fa132a23f7814682dca0dc.tar.bz2 plus-ce28ac8bfcea7ea926fa132a23f7814682dca0dc.tar.xz plus-ce28ac8bfcea7ea926fa132a23f7814682dca0dc.zip |
Add restrict keyword in openglgraphicsdef.hpp
Diffstat (limited to 'src')
-rw-r--r-- | src/render/graphics.cpp | 2 | ||||
-rw-r--r-- | src/render/imagegraphics.h | 2 | ||||
-rw-r--r-- | src/render/mobileopengl2graphics.cpp | 8 | ||||
-rw-r--r-- | src/render/mobileopenglgraphics.cpp | 10 | ||||
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 8 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.cpp | 10 | ||||
-rw-r--r-- | src/render/nullopenglgraphics.cpp | 10 | ||||
-rw-r--r-- | src/render/openglgraphicsdef.hpp | 22 | ||||
-rw-r--r-- | src/render/safeopenglgraphics.cpp | 10 | ||||
-rw-r--r-- | src/render/surfacegraphics.h | 2 |
10 files changed, 42 insertions, 42 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index 1fa8ebce1..8db05d850 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -406,7 +406,7 @@ void Graphics::updateMemoryInfo() #endif } -int Graphics::getMemoryUsage() const +int Graphics::getMemoryUsage() const restrict2 { #ifdef USE_OPENGL if (!mStartFreeMem) diff --git a/src/render/imagegraphics.h b/src/render/imagegraphics.h index 43b3a739e..def080337 100644 --- a/src/render/imagegraphics.h +++ b/src/render/imagegraphics.h @@ -146,7 +146,7 @@ class ImegeGraphics final : public Graphics void fillRectangle(const Rect &rect A_UNUSED) override final { } - void drawRectangle(const Rect &rect A_UNUSED) override final + void drawRectangle(const Rect &rect A_UNUSED) restrict2 override final { } void drawPoint(int x A_UNUSED, int y A_UNUSED) override final diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp index 41e49b497..cd9686149 100644 --- a/src/render/mobileopengl2graphics.cpp +++ b/src/render/mobileopengl2graphics.cpp @@ -211,7 +211,7 @@ void MobileOpenGL2Graphics::screenResized() postInit(); } -void MobileOpenGL2Graphics::deleteArrays() +void MobileOpenGL2Graphics::deleteArrays() restrict2 { deleteArraysInternal(); } @@ -251,7 +251,7 @@ void MobileOpenGL2Graphics::setColor(const Color &color) } } -void MobileOpenGL2Graphics::setColorAlpha(const float alpha) +void MobileOpenGL2Graphics::setColorAlpha(const float alpha) restrict2 { if (mAlphaCached != alpha) { @@ -994,7 +994,7 @@ void MobileOpenGL2Graphics::fillRectangle(const Rect &restrict rect) restrict2 mglDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } -void MobileOpenGL2Graphics::setTexturingAndBlending(const bool enable) +void MobileOpenGL2Graphics::setTexturingAndBlending(const bool enable) restrict2 { if (enable) { @@ -1211,7 +1211,7 @@ void MobileOpenGL2Graphics::calcImageRect(ImageVertexes *restrict const vert, #include "render/graphics_calcImageRect.hpp" } -void MobileOpenGL2Graphics::clearScreen() const +void MobileOpenGL2Graphics::clearScreen() const restrict2 { mglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index 8c1c07c0f..a875befc9 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -127,7 +127,7 @@ void MobileOpenGLGraphics::initArrays(const int vertCount) mShortVertArrayCached = new GLshort[sz]; } -void MobileOpenGLGraphics::deleteArrays() +void MobileOpenGLGraphics::deleteArrays() restrict2 { deleteArraysInternal(); } @@ -1051,7 +1051,7 @@ void MobileOpenGLGraphics::fillRectangle(const Rect &restrict rect) restrict2 drawRectangle(rect, true); } -void MobileOpenGLGraphics::setTexturingAndBlending(const bool enable) +void MobileOpenGLGraphics::setTexturingAndBlending(const bool enable) restrict2 { if (enable) { @@ -1270,7 +1270,7 @@ void MobileOpenGLGraphics::dumpSettings() } } -void MobileOpenGLGraphics::setColorAlpha(const float alpha) +void MobileOpenGLGraphics::setColorAlpha(const float alpha) restrict2 { if (!mIsByteColor && mFloatColor == alpha) return; @@ -1280,7 +1280,7 @@ void MobileOpenGLGraphics::setColorAlpha(const float alpha) mFloatColor = alpha; } -void MobileOpenGLGraphics::restoreColor() +void MobileOpenGLGraphics::restoreColor() restrict2 { if (mIsByteColor && mByteColor == mColor) return; @@ -1310,7 +1310,7 @@ void MobileOpenGLGraphics::calcImageRect(ImageVertexes *restrict const vert, #include "render/graphics_calcImageRect.hpp" } -void MobileOpenGLGraphics::clearScreen() const +void MobileOpenGLGraphics::clearScreen() const restrict2 { mglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index cb24eb887..3872a8af9 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -211,7 +211,7 @@ void ModernOpenGLGraphics::screenResized() postInit(); } -void ModernOpenGLGraphics::deleteArrays() +void ModernOpenGLGraphics::deleteArrays() restrict2 { deleteArraysInternal(); } @@ -251,7 +251,7 @@ void ModernOpenGLGraphics::setColor(const Color &color) } } -void ModernOpenGLGraphics::setColorAlpha(const float alpha) +void ModernOpenGLGraphics::setColorAlpha(const float alpha) restrict2 { if (mAlphaCached != alpha) { @@ -980,7 +980,7 @@ void ModernOpenGLGraphics::fillRectangle(const Rect &restrict rect) restrict2 mglDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } -void ModernOpenGLGraphics::setTexturingAndBlending(const bool enable) +void ModernOpenGLGraphics::setTexturingAndBlending(const bool enable) restrict2 { if (enable) { @@ -1208,7 +1208,7 @@ void ModernOpenGLGraphics::calcImageRect(ImageVertexes *restrict const vert, #include "render/graphics_calcImageRect.hpp" } -void ModernOpenGLGraphics::clearScreen() const +void ModernOpenGLGraphics::clearScreen() const restrict2 { mglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 0fb6c9787..f4d99fa46 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -145,7 +145,7 @@ void NormalOpenGLGraphics::initArrays(const int vertCount) mIntVertArrayCached = new GLint[sz]; } -void NormalOpenGLGraphics::deleteArrays() +void NormalOpenGLGraphics::deleteArrays() restrict2 { deleteArraysInternal(); } @@ -1374,7 +1374,7 @@ void NormalOpenGLGraphics::fillRectangle(const Rect &restrict rect) restrict2 drawRectangle(rect, true); } -void NormalOpenGLGraphics::setTexturingAndBlending(const bool enable) +void NormalOpenGLGraphics::setTexturingAndBlending(const bool enable) restrict2 { if (enable) { @@ -1614,7 +1614,7 @@ void NormalOpenGLGraphics::dumpSettings() } } -void NormalOpenGLGraphics::setColorAlpha(const float alpha) +void NormalOpenGLGraphics::setColorAlpha(const float alpha) restrict2 { if (!mIsByteColor && mFloatColor == alpha) return; @@ -1624,7 +1624,7 @@ void NormalOpenGLGraphics::setColorAlpha(const float alpha) mFloatColor = alpha; } -void NormalOpenGLGraphics::restoreColor() +void NormalOpenGLGraphics::restoreColor() restrict2 { if (mIsByteColor && mByteColor == mColor) return; @@ -1654,7 +1654,7 @@ void NormalOpenGLGraphics::calcImageRect(ImageVertexes *restrict const vert, #include "render/graphics_calcImageRect.hpp" } -void NormalOpenGLGraphics::clearScreen() const +void NormalOpenGLGraphics::clearScreen() const restrict2 { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp index c8030e104..5a2c4f0d9 100644 --- a/src/render/nullopenglgraphics.cpp +++ b/src/render/nullopenglgraphics.cpp @@ -89,7 +89,7 @@ void NullOpenGLGraphics::initArrays(const int vertCount) mIntVertArray = new GLint[sz]; } -void NullOpenGLGraphics::deleteArrays() +void NullOpenGLGraphics::deleteArrays() restrict2 { } @@ -1023,7 +1023,7 @@ void NullOpenGLGraphics::fillRectangle(const Rect &restrict rect) restrict2 drawRectangle(rect, true); } -void NullOpenGLGraphics::setTexturingAndBlending(const bool enable) +void NullOpenGLGraphics::setTexturingAndBlending(const bool enable) restrict2 { if (enable) { @@ -1171,7 +1171,7 @@ void NullOpenGLGraphics::dumpSettings() { } -void NullOpenGLGraphics::setColorAlpha(const float alpha) +void NullOpenGLGraphics::setColorAlpha(const float alpha) restrict2 { if (!mIsByteColor && mFloatColor == alpha) return; @@ -1180,7 +1180,7 @@ void NullOpenGLGraphics::setColorAlpha(const float alpha) mFloatColor = alpha; } -void NullOpenGLGraphics::restoreColor() +void NullOpenGLGraphics::restoreColor() restrict2 { if (mIsByteColor && mByteColor == mColor) return; @@ -1205,7 +1205,7 @@ void NullOpenGLGraphics::calcImageRect(ImageVertexes *restrict const vert, #include "render/graphics_calcImageRect.hpp" } -void NullOpenGLGraphics::clearScreen() const +void NullOpenGLGraphics::clearScreen() const restrict2 { } diff --git a/src/render/openglgraphicsdef.hpp b/src/render/openglgraphicsdef.hpp index 7f100f832..3a17899d5 100644 --- a/src/render/openglgraphicsdef.hpp +++ b/src/render/openglgraphicsdef.hpp @@ -21,34 +21,34 @@ */ public: - void drawRectangle(const Rect &rect, - const bool filled); + void drawRectangle(const Rect &restrict rect, + const bool filled) restrict2; void drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height) override final; + const int width, const int height) restrict2 override final; static void dumpSettings(); - int getMemoryUsage() A_WARN_UNUSED; + int getMemoryUsage() restrict2 A_WARN_UNUSED; - void updateTextureFormat(); + void updateTextureFormat() restrict2; - bool isAllowScale() const override final + bool isAllowScale() const restrict2 override final { return true; } - void clearScreen() const override final; + void clearScreen() const restrict2 override final; - void deleteArrays() override final; + void deleteArrays() restrict2 override final; static void bindTexture(const GLenum target, const GLuint texture); static GLuint mTextureBinded; protected: - void setTexturingAndBlending(const bool enable); + void setTexturingAndBlending(const bool enable) restrict2; private: - void inline setColorAlpha(const float alpha); + void inline setColorAlpha(const float alpha) restrict2; - void inline restoreColor(); + void inline restoreColor() restrict2; diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index 3ab6351df..57337412c 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -51,7 +51,7 @@ SafeOpenGLGraphics::~SafeOpenGLGraphics() { } -void SafeOpenGLGraphics::deleteArrays() +void SafeOpenGLGraphics::deleteArrays() restrict2 { } @@ -627,7 +627,7 @@ void SafeOpenGLGraphics::fillRectangle(const Rect &restrict rect) restrict2 drawRectangle(rect, true); } -void SafeOpenGLGraphics::setTexturingAndBlending(const bool enable) +void SafeOpenGLGraphics::setTexturingAndBlending(const bool enable) restrict2 { if (enable) { @@ -696,7 +696,7 @@ void SafeOpenGLGraphics::bindTexture(const GLenum target, const GLuint texture) } } -void SafeOpenGLGraphics::setColorAlpha(const float alpha) +void SafeOpenGLGraphics::setColorAlpha(const float alpha) restrict2 { if (!mIsByteColor && mFloatColor == alpha) return; @@ -706,7 +706,7 @@ void SafeOpenGLGraphics::setColorAlpha(const float alpha) mFloatColor = alpha; } -void SafeOpenGLGraphics::restoreColor() +void SafeOpenGLGraphics::restoreColor() restrict2 { if (mIsByteColor && mByteColor == mColor) return; @@ -719,7 +719,7 @@ void SafeOpenGLGraphics::restoreColor() mByteColor = mColor; } -void SafeOpenGLGraphics::clearScreen() const +void SafeOpenGLGraphics::clearScreen() const restrict2 { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h index 6c821ebfd..8f9bcba99 100644 --- a/src/render/surfacegraphics.h +++ b/src/render/surfacegraphics.h @@ -154,7 +154,7 @@ class SurfaceGraphics final : public Graphics void fillRectangle(const Rect &rect A_UNUSED) override final { } - void drawRectangle(const Rect &rect A_UNUSED) override final + void drawRectangle(const Rect &rect A_UNUSED) restrict2 override final { } void drawPoint(int x A_UNUSED, int y A_UNUSED) override final |