FS2_Open
Open source remastering of the Freespace 2 engine
glcviewport.h
Go to the documentation of this file.
1 #ifndef _GLCVIEWPORT_H
2 #define _GLCVIEWPORT_H
3 /*
4  * Created by Ian "Goober5000" Warfield and "z64555" for the FreeSpace2 Source
5  * Code Project.
6  *
7  * You may not sell or otherwise commercially exploit the source or things you
8  * create based on the source.
9  */
10 
11 #include "base/wxfred_base.h"
12 
13 #include "globalincs/pstypes.h"
14 #include "physics/physics.h"
15 
16 #include "wx/glcanvas.h"
17 
18 
19 #if !wxUSE_GLCANVAS
20  #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
21 #endif
22 
23 enum cmode
24 {
25  cmode_standard, // Standard camera movement controls
26  cmode_orbit, // Camera orbits select object(s)
27  cmode_ship // Controls selected object
28 };
29 
30 class glcViewport : public wxGLCanvas
31 {
32 public:
33  glcViewport( wxWindow *parent, wxWindowID id = wxID_ANY, int*gl_attrib = NULL);
34 
35 protected:
36  // Handlers for glcViewport
37  void OnPaint( wxPaintEvent& event );
38  void OnSize( wxSizeEvent& event);
39  void OnEraseBackgroun( wxEraseEvent& event);
40 
41  void OnMouse( wxMouseEvent& event );
42 private:
43  // Member data
44  vec3d c_pos; // Camera Position
45  matrix c_rot; // Camera Rotation/Orientation
46 
47  // Viewport modes and options
48  cmode Control_mode;
49 
50  bool show_coordinates;
51  bool show_distances;
52  bool show_grid;
53  bool show_grid_aa;
54  bool show_grid_positions;
55  bool show_horizon;
56  bool show_outlines;
57 
58 
59 };
60 
61 #endif // _GLCVIEWPORT_H
Definition: pstypes.h:88
void OnSize(wxSizeEvent &event)
cmode
Definition: glcviewport.h:23
void OnPaint(wxPaintEvent &event)
void OnMouse(wxMouseEvent &event)
struct _cl_event * event
Definition: Glext.h:7296
void OnEraseBackgroun(wxEraseEvent &event)
glcViewport(wxWindow *parent, wxWindowID id=wxID_ANY, int *gl_attrib=NULL)