+++ /dev/null
-// OpenGLView.h : interface of the COpenGLView class\r
-//\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#if !defined(AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_)\r
-#define AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_\r
-\r
-#if _MSC_VER >= 1000\r
-#pragma once\r
-#endif // _MSC_VER >= 1000\r
-\r
-#include <gl\gl.h>\r
-\r
-class COpenGLView : public CView\r
-{\r
-protected: // create from serialization only\r
- COpenGLView();\r
- DECLARE_DYNCREATE(COpenGLView)\r
-\r
-// Attributes\r
-protected:\r
- GLint m_width; // øèðèíà îêíà OpenGL\r
- GLint m_height; // âûñîòà îêíà OpenGL\r
- POINT m_mousePosition;\r
- GLdouble m_translate[3];\r
- GLdouble m_rotate[16];\r
-\r
-\r
-public:\r
- CDocument* GetDocument();\r
-\r
-// Operations\r
-public:\r
-\r
-protected:\r
- CClientDC *m_pDC;\r
-\r
-// Overrides\r
- // ClassWizard generated virtual function overrides\r
- //{{AFX_VIRTUAL(COpenGLView)\r
- public:\r
- virtual void OnDraw(CDC* pDC); // overridden to draw this view\r
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);\r
- protected:\r
- virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);\r
- virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);\r
- virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);\r
- //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-public:\r
- virtual void DrawScene(CDC* pDC = 0);\r
- void InitCameraPosition();\r
- void SetOwnContext();\r
- void TrackBall(CPoint last, CPoint init, double& angle, double& x, double& y, double& z);\r
- void Swap();\r
- void EndScene();\r
- void BeginScene();\r
- virtual ~COpenGLView();\r
-#ifdef _DEBUG\r
- virtual void AssertValid() const;\r
- virtual void Dump(CDumpContext& dc) const;\r
-#endif\r
-\r
-protected:\r
- BOOL SetPixelFormat(HDC hdc);\r
- BOOL CreateGLContext(HDC hdc);\r
-\r
-// Generated message map functions\r
-protected:\r
- int InitOpenGL();\r
- //{{AFX_MSG(COpenGLView)\r
- afx_msg void OnDestroy();\r
- afx_msg void OnSize(UINT nType, int cx, int cy);\r
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);\r
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);\r
- //}}AFX_MSG\r
- DECLARE_MESSAGE_MAP()\r
-private:\r
- HGLRC m_hrc;\r
-};\r
-\r
-#ifndef _DEBUG // debug version in OpenGLView.cpp\r
-inline CDocument* COpenGLView::GetDocument()\r
- { return (CDocument*)m_pDocument; }\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Developer Studio will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_)
\ No newline at end of file