Browse Source

FIxed rendering artifacts in OpenGL canvas.

pull/7/head
Maciej Suminski 10 years ago
parent
commit
247f018075
  1. 2
      common/gal/opengl/opengl_compositor.cpp
  2. 2
      common/gal/opengl/opengl_gal.cpp

2
common/gal/opengl/opengl_compositor.cpp

@ -69,7 +69,7 @@ void OPENGL_COMPOSITOR::Initialize()
// Use here a size of 24 bits for the depth buffer, 8 bits for the stencil buffer
// this is required later for anti-aliasing
glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, m_width, m_height );
glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT16, m_width, m_height );
glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER_EXT, m_depthBuffer );

2
common/gal/opengl/opengl_gal.cpp

@ -41,7 +41,7 @@
using namespace KIGFX;
static void InitTesselatorCallbacks( GLUtesselator* aTesselator );
const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 };
const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 8, 0 };
wxGLContext* OPENGL_GAL::glContext = NULL;
OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,

Loading…
Cancel
Save