Loading 3d-viewer/3d_canvas.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -73,9 +73,9 @@ EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END, Pcb3D_GLCanvas::OnPopUpMenu ) END_EVENT_TABLE() Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) : #if wxCHECK_VERSION( 2, 9, 0 ) wxGLCanvas( parent, -1, NULL, wxDefaultPosition, wxDefaultSize, Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, int* attribList ) : #if wxCHECK_VERSION( 2, 7, 0 ) wxGLCanvas( parent, -1, attribList, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ) #else wxGLCanvas( parent, -1, wxDefaultPosition, wxDefaultSize, Loading @@ -87,7 +87,7 @@ Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) : m_Parent = parent; m_ortho = false; #if wxCHECK_VERSION( 2, 9, 0 ) #if wxCHECK_VERSION( 2, 7, 0 ) // Explicitly create a new rendering context instance for this canvas. m_glRC = new wxGLContext( this ); Loading @@ -101,7 +101,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas() { ClearLists(); m_init = FALSE; #if wxCHECK_VERSION( 2, 9, 0 ) #if wxCHECK_VERSION( 2, 7, 0 ) delete m_glRC; #endif } Loading 3d-viewer/3d_draw.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,11 @@ static void CALLBACK tesswxPoint2Vertex( const GLvoid* data ); void Pcb3D_GLCanvas::Redraw( bool finish ) { #if wxCHECK_VERSION( 2, 9, 0 ) /* SwapBuffer requires the window to be shown before calling */ if( !IsShown() ) return; #if wxCHECK_VERSION( 2, 7, 0 ) SetCurrent( *m_glRC ); #else SetCurrent(); Loading Loading @@ -96,8 +100,9 @@ void Pcb3D_GLCanvas::Redraw( bool finish ) } glFlush(); if( finish ) if( finish ); glFinish(); SwapBuffers(); } Loading 3d-viewer/3d_frame.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, ReCreateVToolbar(); // Make a Pcb3D_GLCanvas m_Canvas = new Pcb3D_GLCanvas( this ); int attrs[] = {WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0}; m_Canvas = new Pcb3D_GLCanvas( this, attrs ); m_auimgr.SetManagedWindow( this ); Loading 3d-viewer/3d_viewer.h +2 −2 Original line number Diff line number Diff line Loading @@ -141,11 +141,11 @@ private: /// Tracks whether to use Orthographic or Perspective projection //TODO: Does this belong here, or in WinEDA3D_DrawFrame ??? bool m_ortho; #if wxCHECK_VERSION( 2, 9, 0 ) #if wxCHECK_VERSION( 2, 7, 0 ) wxGLContext* m_glRC; #endif public: Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ); Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, int* attribList = 0 ); ~Pcb3D_GLCanvas(); void ClearLists(); Loading Loading
3d-viewer/3d_canvas.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -73,9 +73,9 @@ EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END, Pcb3D_GLCanvas::OnPopUpMenu ) END_EVENT_TABLE() Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) : #if wxCHECK_VERSION( 2, 9, 0 ) wxGLCanvas( parent, -1, NULL, wxDefaultPosition, wxDefaultSize, Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, int* attribList ) : #if wxCHECK_VERSION( 2, 7, 0 ) wxGLCanvas( parent, -1, attribList, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ) #else wxGLCanvas( parent, -1, wxDefaultPosition, wxDefaultSize, Loading @@ -87,7 +87,7 @@ Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) : m_Parent = parent; m_ortho = false; #if wxCHECK_VERSION( 2, 9, 0 ) #if wxCHECK_VERSION( 2, 7, 0 ) // Explicitly create a new rendering context instance for this canvas. m_glRC = new wxGLContext( this ); Loading @@ -101,7 +101,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas() { ClearLists(); m_init = FALSE; #if wxCHECK_VERSION( 2, 9, 0 ) #if wxCHECK_VERSION( 2, 7, 0 ) delete m_glRC; #endif } Loading
3d-viewer/3d_draw.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,11 @@ static void CALLBACK tesswxPoint2Vertex( const GLvoid* data ); void Pcb3D_GLCanvas::Redraw( bool finish ) { #if wxCHECK_VERSION( 2, 9, 0 ) /* SwapBuffer requires the window to be shown before calling */ if( !IsShown() ) return; #if wxCHECK_VERSION( 2, 7, 0 ) SetCurrent( *m_glRC ); #else SetCurrent(); Loading Loading @@ -96,8 +100,9 @@ void Pcb3D_GLCanvas::Redraw( bool finish ) } glFlush(); if( finish ) if( finish ); glFinish(); SwapBuffers(); } Loading
3d-viewer/3d_frame.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, ReCreateVToolbar(); // Make a Pcb3D_GLCanvas m_Canvas = new Pcb3D_GLCanvas( this ); int attrs[] = {WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0}; m_Canvas = new Pcb3D_GLCanvas( this, attrs ); m_auimgr.SetManagedWindow( this ); Loading
3d-viewer/3d_viewer.h +2 −2 Original line number Diff line number Diff line Loading @@ -141,11 +141,11 @@ private: /// Tracks whether to use Orthographic or Perspective projection //TODO: Does this belong here, or in WinEDA3D_DrawFrame ??? bool m_ortho; #if wxCHECK_VERSION( 2, 9, 0 ) #if wxCHECK_VERSION( 2, 7, 0 ) wxGLContext* m_glRC; #endif public: Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ); Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, int* attribList = 0 ); ~Pcb3D_GLCanvas(); void ClearLists(); Loading