cgl.h

来自「c++程序」· C头文件 代码 · 共 34 行

H
34
字号
// CGL.h: Schnittstelle f黵 die Klasse CGL.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GL_H__E9B4C5E2_A6CD_11D1_8F4C_40A87CC10B05__INCLUDED_)
#define AFX_GL_H__E9B4C5E2_A6CD_11D1_8F4C_40A87CC10B05__INCLUDED_

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

#include "stdafx.h"

class CGL  
{
public:
	float GetAspect();
	void SwapBuffers();
	void DestroyGL();
	bool InitGL(unsigned int Width, unsigned int Height, bool bFullscreen, HWND hWnd);
	CGL();
	virtual ~CGL();
	void Resize(unsigned int iWidth, unsigned int iHeight, unsigned int iFOV, float fViewDepth);
private:
	float m_Aspect;
	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 iWidth, unsigned int iHeight);
	bool InitGLState();
};

#endif // !defined(AFX_GL_H__E9B4C5E2_A6CD_11D1_8F4C_40A87CC10B05__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?