From 4743763d48f377d42c7188071cfff39a35052d12 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 28 Mar 2012 15:10:59 -0300 Subject: [PATCH] remvoe blur, fix scroll issue on win32 --- src/framework/graphics/graphics.cpp | 10 ++++++---- src/framework/platform/win32window.cpp | 5 +++-- src/framework/platform/x11window.cpp | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/framework/graphics/graphics.cpp b/src/framework/graphics/graphics.cpp index f8750aa8..f7d69292 100644 --- a/src/framework/graphics/graphics.cpp +++ b/src/framework/graphics/graphics.cpp @@ -49,7 +49,7 @@ void Graphics::init() #endif glEnable(GL_BLEND); - glClear(GL_ACCUM_BUFFER_BIT); + //glClear(GL_ACCUM_BUFFER_BIT); m_emptyTexture = TexturePtr(new Texture); @@ -83,7 +83,7 @@ bool Graphics::parseOption(const std::string& option) void Graphics::resize(const Size& size) { setViewportSize(size); - glClear(GL_ACCUM_BUFFER_BIT); + //glClear(GL_ACCUM_BUFFER_BIT); // The projection matrix converts from Painter's coordinate system to GL's coordinate system // * GL's viewport is 2x2, Painter's is width x height @@ -114,13 +114,15 @@ void Graphics::beginRender() void Graphics::endRender() { // this is a simple blur effect + /* static Timer timer; if(timer.ticksElapsed() >= 10) { - glAccum(GL_MULT, 0.8); - glAccum(GL_ACCUM, 0.2); + glAccum(GL_MULT, 0.9); + glAccum(GL_ACCUM, 0.1); timer.restart(); } glAccum(GL_RETURN, 1); + */ } void Graphics::beginClipping(const Rect& clipRect) diff --git a/src/framework/platform/win32window.cpp b/src/framework/platform/win32window.cpp index e8f143d1..8ee01490 100644 --- a/src/framework/platform/win32window.cpp +++ b/src/framework/platform/win32window.cpp @@ -306,7 +306,7 @@ void WIN32Window::internalChooseGLVisual() 0, // No Alpha Buffer 0, // Shift Bit Ignored 0, // No Accumulation Buffer - 8, 8, 8, 8, // Accumulation Bits Ignored + 0, 0, 0, 0, // Accumulation Bits Ignored 16, // 16Bit Z-Buffer (Depth Buffer) 1, // 1Bit Stencil Buffer 0, // No Auxiliary Buffer @@ -555,8 +555,9 @@ LRESULT WIN32Window::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar break; } case WM_MOUSEWHEEL: { + m_inputEvent.reset(Fw::MouseWheelInputEvent); m_inputEvent.mouseButton = Fw::MouseMidButton; - m_inputEvent.wheelDirection = HIWORD(wParam) > 0 ? Fw::MouseWheelUp : Fw::MouseWheelDown; + m_inputEvent.wheelDirection = ((short)HIWORD(wParam)) > 0 ? Fw::MouseWheelUp : Fw::MouseWheelDown; if(m_onInputEvent) m_onInputEvent(m_inputEvent); break; diff --git a/src/framework/platform/x11window.cpp b/src/framework/platform/x11window.cpp index c5654958..459890ec 100644 --- a/src/framework/platform/x11window.cpp +++ b/src/framework/platform/x11window.cpp @@ -368,10 +368,12 @@ void X11Window::internalChooseGLVisual() GLX_RGBA, GLX_DOUBLEBUFFER, GLX_STENCIL_SIZE, 1, + /* GLX_ACCUM_RED_SIZE, 8, GLX_ACCUM_GREEN_SIZE, 8, GLX_ACCUM_BLUE_SIZE, 8, GLX_ACCUM_ALPHA_SIZE, 8, + */ None };