]>
git.saurik.com Git - wxWidgets.git/blob - utils/glcanvas/samples/penguin/penguin.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGLCanvas demo program
4 // Author: Robert Roebling
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_PENGUIN_H_
13 #define _WX_PENGUIN_H_
19 #include "wx/dcclient.h"
25 #include "trackball.h"
28 /* information needed to display lightwave mesh */
31 gint do_init
; /* true if initgl not yet called */
32 lwObject
*lwobject
; /* lightwave object mesh */
33 float beginx
,beginy
; /* position of mouse */
34 float quat
[4]; /* orientation of object */
35 float zoom
; /* field of view in degrees */
39 /* Define a new application type */
40 class MyApp
: public wxApp
46 /* Define a new frame type */
48 class MyFrame
: public wxFrame
51 MyFrame(wxFrame
*frame
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
,
52 long style
= wxDEFAULT_FRAME_STYLE
);
54 void OnExit(wxCommandEvent
& event
);
57 TestGLCanvas
* m_canvas
;
63 class TestGLCanvas
: public wxGLCanvas
66 TestGLCanvas(wxWindow
*parent
, const wxWindowID id
= -1, const wxPoint
& pos
= wxDefaultPosition
,
67 const wxSize
& size
= wxDefaultSize
, long style
= 0, const wxString
& name
= "TestGLCanvas");
70 void OnPaint(wxPaintEvent
& event
);
71 void OnSize(wxSizeEvent
& event
);
72 void OnEraseBackground(wxEraseEvent
& event
);
73 void LoadLWO( const wxString
&filename
);
74 void OnMouse( wxMouseEvent
& event
);