diff options
Diffstat (limited to 'jni/feature_mos/src/mosaic_renderer/Renderer.cpp')
-rwxr-xr-x[-rw-r--r--] | jni/feature_mos/src/mosaic_renderer/Renderer.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/jni/feature_mos/src/mosaic_renderer/Renderer.cpp b/jni/feature_mos/src/mosaic_renderer/Renderer.cpp index 8d0632402..b9938eb6b 100644..100755 --- a/jni/feature_mos/src/mosaic_renderer/Renderer.cpp +++ b/jni/feature_mos/src/mosaic_renderer/Renderer.cpp @@ -111,8 +111,8 @@ GLuint Renderer::createProgram(const char* pVertexSource, const char* pFragmentS } // Set this renderer to use the default frame-buffer (screen) and -// set the viewport size to be the given x, y, width and height (pixels). -bool Renderer::SetupGraphics(int x, int y, int width, int height) +// set the viewport size to be the given width and height (pixels). +bool Renderer::SetupGraphics(int width, int height) { bool succeeded = false; do { @@ -131,10 +131,8 @@ bool Renderer::SetupGraphics(int x, int y, int width, int height) mFrameBuffer = NULL; mSurfaceWidth = width; mSurfaceHeight = height; - mSurfaceXOffset = x; - mSurfaceYOffset = y; - glViewport(mSurfaceXOffset, mSurfaceYOffset, mSurfaceWidth, mSurfaceHeight); + glViewport(0, 0, mSurfaceWidth, mSurfaceHeight); if (!checkGlError("glViewport")) break; succeeded = true; } while (false); @@ -178,7 +176,7 @@ bool Renderer::Clear(float r, float g, float b, float a) bool succeeded = false; do { bool rt = (mFrameBuffer == NULL)? - SetupGraphics(mSurfaceXOffset, mSurfaceYOffset, mSurfaceWidth, mSurfaceHeight) : + SetupGraphics(mSurfaceWidth, mSurfaceHeight) : SetupGraphics(mFrameBuffer); if(!rt) |