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:
Julian Smart
1998-08-15 17:48:39 +00:00
parent 6967fbf45b
commit c2265822fe
8 changed files with 546 additions and 6 deletions

View File

@@ -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;

View File

@@ -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()