⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 torus.h

📁 Torus3D.rar,BREW平台的3D游戏引擎的一个实例.喜欢的朋友可以下载
💻 H
字号:
// ==========================================================================================================
//
// BREW v2.0+ OPENGLES MICROENGINE
//
// ----------------------------------------
//
// Written by Vander Nunes
//
// ==========================================================================================================

#ifndef __TORUS_H__

	#define __TORUS_H__

	// BREW
	#include "AEEAppGen.h"
	#include "AEEModGen.h"
	#include "AEEStdLib.h"
	#include "AEEFile.h"
	#include "AEEImage.h"
	#include "AEESoundPlayer.h"

	// GL
	#include "AEEGL.h"
	#include "gles/gl.h"
	#include "gles/egl.h"
	#include "igl.h"

	#include "defines.h"

	//
	// TORUS ENGINE
	//
	class CEngine
	{
		private:

			AEEApplet*									m_pApplet;

			IBitmap*                    m_pDDBitmap;
			AEEBitmapInfo               m_DDBitmapInfo;

			//
			// IGL and IEGL interfaces
			//

			IGL*												m_pIGL;
			IEGL*												m_pIEGL;
			EGLDisplay									m_eglDisplay;
			EGLSurface									m_eglSurface;
			EGLContext									m_eglContext;

			// sound interface
			ISoundPlayer*								m_pISoundPlayer;

		public:

			CEngine(AEEApplet* pApplet);
			~CEngine();

			AEEApplet*									Applet() { return m_pApplet; };

			// screen metrics
			int													ScreenWidth(void)  { return m_DDBitmapInfo.cx; };
			int													ScreenHeight(void) { return m_DDBitmapInfo.cy; };
			int													ScreenDepth(void)  { return m_DDBitmapInfo.nDepth; };

			ISoundPlayer*								SoundPlayer() { return m_pISoundPlayer; }

			boolean											Init();
			void												CleanUp(void);

			boolean											SetupGL();
			boolean											SetupEGL();

			void												SwapBuffers();
	};

#endif

⌨️ 快捷键说明

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