skybox.h
来自「此程序需要Brew sdk2.1版本以上,是关于OpenGL的手机编程.」· C头文件 代码 · 共 77 行
H
77 行
#ifndef __GLAUSKYBOX_H_INCLUDED__
#define __GLAUSKYBOX_H_INCLUDED__
/*=================================================================================
FILE: skybox.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 skybox 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 *
*-------------------------------------------------------------------------------*/
#include "gles/gl.h"
#include "gles/egl.h"
#include "igl.h"
#include "xxglu.h"
/*-------------------------------------------------------------------------------*
* M A C R O S *
*-------------------------------------------------------------------------------*/
#define INT_TO_Q16(i) ((i) << 16)
#define FLOAT_TO_Q16(f) ((int)((f) * 65536.0 + ((f) > 0 ? 0.5 : -0.5)))
#define SKY_SIZE FLOAT_TO_Q16(10)
/*-------------------------------------------------------------------------------*
* S k y b o x C L A S S *
*-------------------------------------------------------------------------------*/
class skybox
{
public:
skybox();
~skybox();
// member functions
void Render();
void Release();
enum {
SKY_TOP,
SKY_BOTTOM,
SKY_FRONT,
SKY_BACK,
SKY_LEFT,
SKY_RIGHT
};
void spinX( int delta ) { m_skyboxRotX += delta; };
void spinY( int delta ) { m_skyboxRotY += delta; };
void move ( int delta ) { m_skyboxMove += delta; };
GLuint m_textures[6];
private:
//int counter;
int m_skyboxRotY;
int m_skyboxRotX;
int m_skyboxMove;
//int m_autoboxrotx;
};
#endif // __GLAUSKYBOX_H_INCLUDED__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?