Fix wx28 compatibility.
This commit is contained in:
parent
4a96813d42
commit
cdffdc398e
|
@ -107,6 +107,8 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
|
||||||
ReCreateMainToolbar();
|
ReCreateMainToolbar();
|
||||||
|
|
||||||
// Make a EDA_3D_CANVAS
|
// Make a EDA_3D_CANVAS
|
||||||
|
// Note: We try to use anti aliasing if the graphic card allows that,
|
||||||
|
// but only on wxWidgets >= 3.0.0 (this option does not exist on wxWidgets 2.8)
|
||||||
int attrs[] = { // This array should be 2*n+1
|
int attrs[] = { // This array should be 2*n+1
|
||||||
// Sadly wxwidgets / glx < 13 allowed
|
// Sadly wxwidgets / glx < 13 allowed
|
||||||
// a thing named "boolean attributes" that don't take a value.
|
// a thing named "boolean attributes" that don't take a value.
|
||||||
|
@ -122,10 +124,15 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
|
||||||
// Normal attributes with values:
|
// Normal attributes with values:
|
||||||
WX_GL_DEPTH_SIZE, 16,
|
WX_GL_DEPTH_SIZE, 16,
|
||||||
WX_GL_STENCIL_SIZE, 1,
|
WX_GL_STENCIL_SIZE, 1,
|
||||||
|
#if wxCHECK_VERSION( 3, 0, 0 )
|
||||||
WX_GL_SAMPLE_BUFFERS, 1, // Enable multisampling support (antialiasing).
|
WX_GL_SAMPLE_BUFFERS, 1, // Enable multisampling support (antialiasing).
|
||||||
WX_GL_SAMPLES, 0, // Disable AA for the start.
|
WX_GL_SAMPLES, 0, // Disable AA for the start.
|
||||||
|
#endif
|
||||||
0 }; // NULL termination
|
0 }; // NULL termination
|
||||||
|
|
||||||
|
|
||||||
|
#if wxCHECK_VERSION( 3, 0, 0 )
|
||||||
|
|
||||||
unsigned int ii;
|
unsigned int ii;
|
||||||
|
|
||||||
// Check if the canvas supports multisampling.
|
// Check if the canvas supports multisampling.
|
||||||
|
@ -164,6 +171,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
m_canvas = new EDA_3D_CANVAS( this, attrs );
|
m_canvas = new EDA_3D_CANVAS( this, attrs );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue