www.pudn.com > 林海血原源代码.zip > CGL.h
// CGL.h: interface for the CGL class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CGL_H__C78240E8_DC59_11D5_812C_5254AB37CDC9__INCLUDED_)
#define AFX_CGL_H__C78240E8_DC59_11D5_812C_5254AB37CDC9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CGL
{
public:
CGL();
virtual ~CGL();
void SwapBuffers();
void DestroyGL();
bool InitGL(unsigned int Width, unsigned int Height, bool bFullscreen, HWND hWnd);
void Resize( int iHeight,int iFOVAngle);
void ChangeFOVAngle(int state);
private:
int m_ScrWidth;
int m_ScrHeight;
int m_FOV;
HGLRC m_hRC; // Permanent rendering context
HDC m_hDC; // Private GDI device context
HWND m_hWnd; // Window to wich the RC is attached
bool ChangeResolution(unsigned int iHeight,unsigned int iWidth);
bool InitGLState();
};
#endif // !defined(AFX_CGL_H__C78240E8_DC59_11D5_812C_5254AB37CDC9__INCLUDED_)