#endif
#include "cube.h"
+#include "../../sample.xpm"
#ifndef __WXMSW__ // for wxStopWatch, see remark below
#if defined(__WXMAC__) && !defined(__DARWIN__)
TestGLCanvas::TestGLCanvas(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name)
- : wxGLCanvas(parent, (wxGLCanvas*) NULL, id, pos, size, style, name )
+ : wxGLCanvas(parent, (wxGLCanvas*) NULL, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE , name )
{
m_init = false;
m_gllist = 0;
TestGLCanvas::TestGLCanvas(wxWindow *parent, const TestGLCanvas &other,
wxWindowID id, const wxPoint& pos, const wxSize& size, long style,
const wxString& name )
- : wxGLCanvas(parent, other.GetContext(), id, pos, size, style, name)
+ : wxGLCanvas(parent, other.GetContext(), id, pos, size, style|wxFULL_REPAINT_ON_RESIZE , name)
{
m_init = false;
m_gllist = other.m_gllist; // share display list
: wxFrame(parent, wxID_ANY, title, pos, size, style)
{
m_canvas = NULL;
+ SetIcon(wxIcon(sample_xpm));
}
// Intercept menu commands
MyFrame *frame = new MyFrame(NULL, str, wxDefaultPosition,
wxSize(400, 300));
- // Give it an icon
-#ifdef __WXMSW__
- frame->SetIcon(wxIcon(_T("mondrian")));
-#endif
-
// Make a menubar
wxMenu *winMenu = new wxMenu;
#include "isosurf.h"
+#include "../../sample.xpm"
+
// The following part is taken largely unchanged from the original C Version
GLboolean speed_test = GL_FALSE;
: wxFrame(frame, wxID_ANY, title, pos, size, style)
{
m_canvas = NULL;
+ SetIcon(wxIcon(sample_xpm));
}
MyFrame::~MyFrame()
TestGLCanvas::TestGLCanvas(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style,
const wxString& name, int* gl_attrib)
- : wxGLCanvas(parent, id, pos, size, style, name, gl_attrib)
+ : wxGLCanvas(parent, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name, gl_attrib)
{
parent->Show(true);
SetCurrent();
# include <GL/glu.h>
#endif
+#include "../../sample.xpm"
+
#define VIEW_ASPECT 1.3
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
-
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, wxT("wxWidgets OpenGL Penguin Sample"),
wxDefaultPosition, wxDefaultSize);
: wxFrame(frame, wxID_ANY, title, pos, size, style)
{
m_canvas = NULL;
+ SetIcon(wxIcon(sample_xpm));
}
/* Intercept menu commands */
TestGLCanvas::TestGLCanvas(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name)
- : wxGLCanvas(parent, id, pos, size, style, name)
+ : wxGLCanvas(parent, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name)
{
block = false;
}
-/* mondrian ICON "mondrian.ico" */
-#include "wx/msw/wx.rc"
+// #include "wx/msw/wx.rc"
+#include "../../sample.rc"