Скачиваний:
12
Добавлен:
01.05.2014
Размер:
3.05 Кб
Скачать
// GLlabView.h : interface of the CGLlabView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GLLABVIEW_H__74072631_6B6D_46C2_965E_A0986C104464__INCLUDED_)
#define AFX_GLLABVIEW_H__74072631_6B6D_46C2_965E_A0986C104464__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <gl\gl.h>
#include <gl\glu.h>

enum {Points, LineStrip, TriangleFan, Quads};
enum {TglScissor, TglAlphaFunc, TglBlendFunc};

class CGLlabView : public CView
{
protected: // create from serialization only
	CGLlabView();
	DECLARE_DYNCREATE(CGLlabView)

// Attributes
public:
	CGLlabDoc* GetDocument();

protected:
	HGLRC m_hRC;
    int m_shape;
	int m_test;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGLlabView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CGLlabView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

	//My functions for display

	void DrawWithOpenGL();
	void DrawPoints();
	void DrawLineStrip();
	void DrawTriangleFan();
	void DrawQuads();

	void EnGlscissor();
	void DisGlscissor();
	void EnAlphafunc();
	void DisAlphafunc();
	void EnGlblendfunc();
	void DisGlblendfunc();

// Generated message map functions
protected:
	//{{AFX_MSG(CGLlabView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnDrawLinestrip();
	afx_msg void OnUpdateDrawLinestrip(CCmdUI* pCmdUI);
	afx_msg void OnDrawPoints();
	afx_msg void OnUpdateDrawPoints(CCmdUI* pCmdUI);
	afx_msg void OnDrawQuadrilaterals();
	afx_msg void OnUpdateDrawQuadrilaterals(CCmdUI* pCmdUI);
	afx_msg void OnDrawTrianglefan();
	afx_msg void OnUpdateDrawTrianglefan(CCmdUI* pCmdUI);
	afx_msg void OnTestGlscissor();
	afx_msg void OnUpdateTestGlscissor(CCmdUI* pCmdUI);
	afx_msg void OnTestGlalphafunc();
	afx_msg void OnUpdateTestGlalphafunc(CCmdUI* pCmdUI);
	afx_msg void OnTestGlblendfunc();
	afx_msg void OnUpdateTestGlblendfunc(CCmdUI* pCmdUI);
	afx_msg void OnTestsNull();
	afx_msg void OnUpdateTestsNull(CCmdUI* pCmdUI);
	afx_msg void OnTestsrelocation();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in GLlabView.cpp
inline CGLlabDoc* CGLlabView::GetDocument()
   { return (CGLlabDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GLLABVIEW_H__74072631_6B6D_46C2_965E_A0986C104464__INCLUDED_)
Соседние файлы в папке GLlab2