diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-06 21:13:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-07 12:46:08 +0300 |
commit | d812d9fac7bae4eff66a5ce8275be19d0ca77a32 (patch) | |
tree | 7f9619d23a44202a76282849bb1284773302309f /src/safeopenglgraphics.cpp | |
parent | 1bcaac517036751a8fee9ff3d6561f5866e6969e (diff) | |
download | ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.gz ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.bz2 ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.xz ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.zip |
Add own profiler and profiler info to some code.
Diffstat (limited to 'src/safeopenglgraphics.cpp')
-rw-r--r-- | src/safeopenglgraphics.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/safeopenglgraphics.cpp b/src/safeopenglgraphics.cpp index f4ae7ba93..9ca2340d0 100644 --- a/src/safeopenglgraphics.cpp +++ b/src/safeopenglgraphics.cpp @@ -147,6 +147,7 @@ bool SafeOpenGLGraphics::drawImage2(const Image *const image, const int width, const int height, const bool useColor) { + FUNC_BLOCK("Graphics::drawImage2", 1) if (!image) return false; @@ -190,6 +191,7 @@ bool SafeOpenGLGraphics::drawRescaledImage(Image *const image, int srcX, const bool useColor, bool smooth) { + FUNC_BLOCK("Graphics::drawRescaledImage", 1) if (!image) return false; @@ -245,6 +247,7 @@ void SafeOpenGLGraphics::drawImagePattern(const Image *const image, const int x, const int y, const int w, const int h) { + FUNC_BLOCK("Graphics::drawImagePattern", 1) if (!image) return; @@ -375,9 +378,11 @@ void SafeOpenGLGraphics::drawImageRect2(GraphicsVertexes* vert, void SafeOpenGLGraphics::updateScreen() { + BLOCK_START("Graphics::updateScreen") glFlush(); glFinish(); SDL_GL_SwapBuffers(); + BLOCK_END("Graphics::updateScreen") } void SafeOpenGLGraphics::_beginDraw() @@ -589,6 +594,7 @@ void SafeOpenGLGraphics::setTexturingAndBlending(bool enable) void SafeOpenGLGraphics::drawRectangle(const gcn::Rectangle& rect, bool filled) { + BLOCK_START("Graphics::drawRectangle") const float offset = filled ? 0 : 0.5f; setTexturingAndBlending(false); @@ -604,6 +610,7 @@ void SafeOpenGLGraphics::drawRectangle(const gcn::Rectangle& rect, bool filled) glVertex2f(static_cast<float>(rect.x) + offset, static_cast<float>(rect.y + rect.height) - offset); glEnd(); + BLOCK_END("Graphics::drawRectangle") } void SafeOpenGLGraphics::bindTexture(GLenum target, GLuint texture) |