00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 // Copyright (C) 2010 Daniele Giannetti 00012 // 00013 // This file is part of VR3Lib. 00014 // The VR3Lib is free software, but is distributed in the static precompiled 00015 // version as it is NOT open source. The VR3Lib may be used in any virtual 00016 // reality application free of charge, but it must be clearly stated that this 00017 // library is used in the application EULA and distribution license 00018 // (for both free and proprietary applications). 00020 00021 #ifndef __VR3BACKGROUND_H__ 00022 #define __VR3BACKGROUND_H__ 00023 00024 #include <VR3Texture.h> 00025 00027 00034 class VR3Background { 00035 00037 bool m_fl_skybox; 00039 VR3Texture* m_texture; 00040 00042 GLuint m_shader_program; 00044 const GLint* m_unilocs; 00045 00047 VR3Scene* m_scene; 00048 00050 GLuint m_VAO; 00052 GLuint m_VBO; 00053 00055 VR3Background(const VR3Background&); 00057 VR3Background& operator = (const VR3Background&); 00058 00059 //------------------- VAO and VBOs Preparation Function ---------------------// 00060 00062 00063 00065 00071 void PrepareVAO(); 00072 00074 00075 public: 00076 00077 //----------------------- Constructor and Destructor -------------------------// 00078 00080 00081 00083 00090 VR3Background(VR3Scene* scene); 00091 00093 00097 ~VR3Background(); 00098 00100 00101 //------------------- Background Set and Get Functions -----------------------// 00102 00104 00105 00107 00119 void SetBackground(const char* file_name, bool fl_skybox); 00120 00122 00129 VR3Texture* GetBackground(); 00130 00132 00133 //------------------------------ Draw Method ---------------------------------// 00134 00136 00137 00139 00143 void Draw(); 00144 00146 00147 }; 00148 00149 #endif