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 __VR3FBO_H__ 00022 #define __VR3FBO_H__ 00023 00025 00067 class VR3FBO { 00068 00070 GLuint m_FBO; 00071 00073 GLuint m_depthRBO; 00074 00076 struct ArrayElement { 00078 GLuint tex; 00080 GLint min_filter; 00082 GLint mag_filter; 00083 }; 00084 00086 ArrayElement m_images[VR3FBO_MAX_IMAGES]; 00087 00089 GLsizei m_width; 00091 GLsizei m_height; 00092 00094 VR3FBO(const VR3FBO&); 00096 VR3FBO& operator = (const VR3FBO&); 00097 00098 public: 00099 00100 //----------------------- Constructor and Destructor -------------------------// 00101 00103 00104 00106 00111 VR3FBO(GLsizei width, GLsizei height); 00112 00113 00115 00118 ~VR3FBO(); 00119 00121 00122 //------------------------------ Start Function ------------------------------// 00123 00125 00126 00128 00134 void Start(); 00135 00137 00138 //------------------------ Images Management Functions -----------------------// 00139 00141 00142 00144 00155 void AddImage( int attachpoint, GLint internalformat, 00156 GLenum format, GLenum type ); 00157 00159 00167 void ActivateTexture(int attachpoint, unsigned int unit_id); 00168 00170 00181 void SetFiltering(int attachpoint, GLint min_filter, GLint mag_filter); 00182 00184 00185 }; 00186 00187 #endif