]>
git.saurik.com Git - wxWidgets.git/blob - samples/opengl/penguin/penguin.h
0020b657afe8c29b5511586c251da2f5fe89e4bb
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"
21 #include "wx/glcanvas.h"
25 #include "trackball.h"
28 /* information needed to display lightwave mesh */
31 // gint do_init; /* true if initgl not yet called */
33 lwObject
*lwobject
; /* lightwave object mesh */
34 float beginx
,beginy
; /* position of mouse */
35 float quat
[4]; /* orientation of object */
36 float zoom
; /* field of view in degrees */
40 /* Define a new application type */
41 class MyApp
: public wxApp
47 /* Define a new frame type */
50 class MyFrame
: public wxFrame
53 MyFrame(wxFrame
*frame
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
,
54 long style
= wxDEFAULT_FRAME_STYLE
);
56 void OnExit(wxCommandEvent
& event
);
59 void SetCanvas( TestGLCanvas
*canvas
) { m_canvas
= canvas
; }
60 TestGLCanvas
*GetCanvas() { return m_canvas
; }
63 TestGLCanvas
* m_canvas
;
71 class TestGLCanvas
: public wxGLCanvas
74 TestGLCanvas(wxWindow
*parent
, const wxWindowID id
= -1, const wxPoint
& pos
= wxDefaultPosition
,
75 const wxSize
& size
= wxDefaultSize
, long style
= 0, const wxString
& name
= wxT("TestGLCanvas"));
78 void OnPaint(wxPaintEvent
& event
);
79 void OnSize(wxSizeEvent
& event
);
80 void OnEraseBackground(wxEraseEvent
& event
);
81 void LoadLWO( const wxString
&filename
);
82 void OnMouse( wxMouseEvent
& event
);