OPENGL_GAL: don't use glCopyBuffer() on faulty Intel GL drivers

Fixes: lp:1787221
* https://bugs.launchpad.net/kicad/+bug/1787221
This commit is contained in:
Tomasz Wlostowski 2018-08-16 14:34:25 +02:00
parent a88831d7a9
commit aab40ee9e8
1 changed files with 10 additions and 0 deletions

View File

@ -42,6 +42,16 @@ CACHED_CONTAINER_GPU::CACHED_CONTAINER_GPU( unsigned int aSize ) :
{
m_useCopyBuffer = GLEW_ARB_copy_buffer;
wxString vendor( glGetString(GL_VENDOR) );
// workaround for intel GPU drivers: diable glCopyBuffer, causes crashes/freezes on certain driver versions
if( vendor.Contains ( "Intel ") )
{
wxLogDebug("Disabling glCopyBuffer() on intel GPU\n");
m_useCopyBuffer = false;
}
glGenBuffers( 1, &m_glBufferHandle );
glBindBuffer( GL_ARRAY_BUFFER, m_glBufferHandle );
glBufferData( GL_ARRAY_BUFFER, m_currentSize * VERTEX_SIZE, NULL, GL_DYNAMIC_DRAW );