Commit cdffdc39 authored by jean-pierre charras's avatar jean-pierre charras

Fix wx28 compatibility.

parent 4a96813d
...@@ -107,6 +107,8 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, ...@@ -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, ...@@ -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, ...@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment