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

📄 skybox.h

📁 此程序需要Brew sdk2.1版本以上,是关于OpenGL的手机编程.
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -