📄 ogles_demo_01.h
字号:
#ifndef __ogles_demo_01_H_
#define __ogles_demo_01_H_
/*=================================================================================
FILE: ogles_demo_01.h
DESCRIPTION: This file is provide as a standard sample Brew header file.
Please refer to this OpenGL(R)ES brew sample application as a
reference on how to use the standard OpenGL-ES and EGL APIs.
ABSTRACT: The ogles_demo_01 application header file
AUTHOR: QUALCOMM
Copyright (c) 2004 QUALCOMM Incorporated.
All Rights Reserved.
QUALCOMM Proprietary/GTDR
=================================================================================*/
/*-------------------------------------------------------------------------------*
* I N C L U D E F I L E S *
*-------------------------------------------------------------------------------*/
// GL
#include "gles/gl.h"
#include "gles/egl.h"
#include "igl.h"
// ogles_demo_01 Resource Files
#include "ogles_demo_01.bid"
#include "ogles_demo_01_res.h"
// BREW
#include "AEEAppGen.h"
#include "AEEModGen.h"
#include "AEEStdLib.h"
#include "AEEFile.h"
#include "AEEMenu.h"
#include "AEEGL.h"
/*-------------------------------------------------------------------------------*
* M A C R O S *
*-------------------------------------------------------------------------------*/
#define FloatToFixed16(X) ((int32) ((X) * 65535))
#define f16(X) ((int32) ((X) * 65535))
#define ITOX(i) ((i) << 16)
/*-------------------------------------------------------------------------------*
* E N U M T Y P E S *
*-------------------------------------------------------------------------------*/
typedef enum
{
MM_EXIT,
MM_MAINMENU,
MM_TRIANGLE
}MM_STATE;
/*-------------------------------------------------------------------------------*
* S I M P L E 3 D C L A S S *
*-------------------------------------------------------------------------------*/
class ogles_demo_01
{
public:
ogles_demo_01();
~ogles_demo_01();
// Our application, Shell, and Display
AEEApplet m_applet;
IBitmap* m_pDDBitmap;
AEEBitmapInfo m_DDBitmapInfo;
// File I/O
IFileMgr* m_pIFileMgr;
// IGL and IEGL interfaces
IGL* m_pIGL;
IEGL* m_pIEGL;
// EGL Variables
EGLDisplay m_eglDisplay;
EGLSurface m_eglSurface;
EGLContext m_eglContext;
// Key Variables
int m_key_state;
uint16 m_key_wParam;
// Menu Variables
MM_STATE m_eState;
IMenuCtl* m_pMenuCtl;
//member functions
int GetScreenWidth(void) { return m_DDBitmapInfo.cx;};
int GetScreenHeight(void) { return m_DDBitmapInfo.cy;};
int GetScreenDepth(void) { return m_DDBitmapInfo.nDepth;};
static void Destroy(ogles_demo_01*);
static boolean HandleEvent( ogles_demo_01 *pi, AEEEvent eCode, uint16 wParam, uint32 dwParam );
void CleanUp(void);
boolean Init();
boolean SetupGL();
boolean SetupEGL();
void RenderTriangle(void);
void RenderFrame();
static void NextFrame(ogles_demo_01*);
boolean KeyEvent( uint16 wParam);
boolean CmdEvent( uint16 wParam);
boolean BuildMenu(int width,int height);
};
#endif//__ogles_demo_01_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -