Added isosurf wxGLCanvas sample, cured OnPaint bug (missing wxPaintDC object)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,9 +29,6 @@
|
||||
|
||||
#include "cube.h"
|
||||
|
||||
// This statement initializes the whole application and calls OnInit
|
||||
MyApp myApp;
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
// `Main program' equivalent, creating windows and returning main app frame
|
||||
@@ -125,6 +122,10 @@ TestGLCanvas::~TestGLCanvas(void)
|
||||
|
||||
void TestGLCanvas::OnPaint( wxPaintEvent& event )
|
||||
{
|
||||
// This is a dummy, to avoid an endless succession of paint messages.
|
||||
// OnPaint handlers must always create a wxPaintDC.
|
||||
wxPaintDC dc(this);
|
||||
|
||||
if ( !GetContext() )
|
||||
return;
|
||||
|
||||
|
@@ -25,14 +25,14 @@ public:
|
||||
// Define a new frame type
|
||||
class TestGLCanvas;
|
||||
class MyFrame: public wxFrame
|
||||
{ public:
|
||||
{
|
||||
public:
|
||||
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
long style = wxDEFAULT_FRAME_STYLE);
|
||||
|
||||
void OnExit(wxCommandEvent& event);
|
||||
|
||||
bool OnClose(void);
|
||||
|
||||
public:
|
||||
TestGLCanvas* m_canvas;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
Reference in New Issue
Block a user