-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOpenGLView.h
More file actions
executable file
·107 lines (81 loc) · 2.31 KB
/
Copy pathOpenGLView.h
File metadata and controls
executable file
·107 lines (81 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// OpenGLView.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// COpenGLView view
class COpenGLView : public CScrollView
{
protected:
COpenGLView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(COpenGLView)
// Attributes
public:
HBITMAP hBitmap, hOldBitmap;
HPALETTE hPalette;
HDC hDC;
void setupDIB(HDC hDC);
void setupPalette(HDC hDC);
void resizeDIB(HDC hDC);
// Operations
public:
BOOL renderToDIB;
HDC hDCFrontBuffer;
BOOL SetWindowPixelFormat(HDC hDC);
BOOL CreateViewGLContext(HDC hDC);
float m_red[256],m_blue[256],m_green[256];
HPALETTE m_hPalette;
double scaler;
double dist;
virtual void getLookPoint();
void SwapAnyBuffers(HDC hdc);
BOOL doubleBuffered;
HGLRC m_hGLContext;
int m_GLPixelIndex;
void RenderScene(CPaintDC *dc);
//virtual void OpenGLDrawScene(CPaintDC *dc);
virtual void OpenGLDrawScene(HDC hdc);
double m_transY;
double m_transX;
double m_angle1;
double m_angle2;
float m_size;
double m_xRotate;
double m_yRotate;
double m_zRotate;
int m_width;
int m_height;
int m_exp;
CPoint m_RightDownPos;
CPoint m_LeftDownPos;
BOOL m_RightButtonDown;
BOOL m_LeftButtonDown;
BOOL m_ShiftDown;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COpenGLView)
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnInitialUpdate(); // first time after construct
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~COpenGLView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(COpenGLView)
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnIn();
afx_msg void OnOut();
afx_msg void OnZoomHome();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////