📄 ogles_demo_03.h
字号:
#ifndef __ogles_demo_03_H_
#define __ogles_demo_03_H_
/*=================================================================================
FILE: ogles_demo_03.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_03 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_03 Resource Files
#include "ogles_demo_03.bid"
#include "ogles_demo_03_res.h"
// BREW
#include "AEEAppGen.h"
#include "AEEModGen.h"
#include "AEEStdLib.h"
#include "AEEFile.h"
#include "AEEGL.h"
// image
#include "ppm_image.h"
// skybox
#include "skybox.h"
// glu
#include "xxglu.h"
/*-------------------------------------------------------------------------------*
* M A C R O S *
*-------------------------------------------------------------------------------*/
#define INT_TO_Q16(i) ((i) << 16)
/*-------------------------------------------------------------------------------*
* O G L E S _ D E M O _ 0 3 C L A S S *
*-------------------------------------------------------------------------------*/
class ogles_demo_03
{
public:
ogles_demo_03();
~ogles_demo_03();
// 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;
GLboolean isLoaded;
uint8* imageData[6];
GLuint m_boxTopTexture;
GLuint m_boxBottomTexture;
GLuint m_boxLeftTexture;
GLuint m_boxRightTexture;
GLuint m_boxFrontTexture;
GLuint m_boxBackTexture;
int m_frame_time;
int counter;
int m_skyboxRotY;
int m_skyboxRotX;
int m_skyboxMove;
int m_skyboxspin;
boolean m_boxauto;
int m_autoboxrotx;
int m_BoxspinFactor;
int m_boxbounce;
skybox m_skybox;
//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_03*);
static boolean HandleEvent( ogles_demo_03 *pi, AEEEvent eCode, uint16 wParam, uint32 dwParam );
void CleanUp(void);
void FreeTextureData( void );
boolean Init(void);
boolean SetupGL(void);
boolean SetupEGL(void);
void RenderFrame(void);
static void NextFrame(ogles_demo_03*);
boolean KeyEvent( uint16 wParam);
boolean CmdEvent( uint16 wParam);
void LoadTextures(void);
void RenderSkybox(void);
};
#endif//__ogles_demo_03_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -