Commit 0a3c77c3 authored by Lars Krecklau's avatar Lars Krecklau

- VertexBuffer and FrameBuffer renamed to VertexBufferObject and...

- VertexBuffer and FrameBuffer renamed to VertexBufferObject and FrameBufferObject respectively. This convention is more consistent regarding the State, which now gets a FrameBufferObject (FBO), VertexBufferObject (VBO) and ShaderProgramObject (SPO)
- Added controllers and objects to the Controller.hh and Objects.hh respectively
- Added corresponding managers
parent fae8d4a9
...@@ -18,15 +18,17 @@ ...@@ -18,15 +18,17 @@
#include <ACGL/Resource/NameManager.hh> #include <ACGL/Resource/NameManager.hh>
#include <ACGL/Resource/FileManager.hh> #include <ACGL/Resource/FileManager.hh>
#include <ACGL/OpenGL/Controller/ArrayBufferControl.hh>
#include <ACGL/OpenGL/Controller/ElementArrayBufferControl.hh>
#include <ACGL/OpenGL/Controller/FrameBufferObjectControl.hh>
#include <ACGL/OpenGL/Controller/RenderBufferControl.hh>
#include <ACGL/OpenGL/Controller/ShaderControlFile.hh> #include <ACGL/OpenGL/Controller/ShaderControlFile.hh>
#include <ACGL/OpenGL/Controller/ShaderProgramControlAutoFiles.hh> #include <ACGL/OpenGL/Controller/ShaderProgramControlAutoFiles.hh>
#include <ACGL/OpenGL/Controller/ShaderProgramObjectControl.hh>
#include <ACGL/OpenGL/Controller/StateControl.hh>
#include <ACGL/OpenGL/Controller/TextureControl.hh> #include <ACGL/OpenGL/Controller/TextureControl.hh>
#include <ACGL/OpenGL/Controller/TextureControlFileJPG.hh> #include <ACGL/OpenGL/Controller/TextureControlFileJPG.hh>
#include <ACGL/OpenGL/Controller/FrameBufferControl.hh> #include <ACGL/OpenGL/Controller/VertexBufferObjectControl.hh>
#include <ACGL/OpenGL/Controller/RenderBufferControl.hh> #include <ACGL/OpenGL/Controller/VertexBufferObjectControlFileOBJ.hh>
#include <ACGL/OpenGL/Controller/VertexBufferControl.hh>
#include <ACGL/OpenGL/Controller/VertexBufferControlFileOBJ.hh>
#include <ACGL/OpenGL/Controller/ArrayBufferControl.hh>
#include <ACGL/OpenGL/Controller/ElementArrayBufferControl.hh>
#endif // ACGL_OPENGL_CONTROLLER_HH #endif // ACGL_OPENGL_CONTROLLER_HH
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
// All rights reserved. // // All rights reserved. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_OPENGL_CONTROLLER_FRAMEBUFFERCONTROL_HH #ifndef ACGL_OPENGL_CONTROLLER_FRAMEBUFFEROBJECTCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_FRAMEBUFFERCONTROL_HH #define ACGL_OPENGL_CONTROLLER_FRAMEBUFFEROBJECTCONTROL_HH
#include <ACGL/ACGL.hh> #include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicCreateController.hh> #include <ACGL/Resource/BasicCreateController.hh>
#include <ACGL/OpenGL/Objects/FrameBuffer.hh> #include <ACGL/OpenGL/Objects/FrameBufferObject.hh>
#include <ACGL/OpenGL/GL.hh> #include <ACGL/OpenGL/GL.hh>
#include <ACGL/OpenGL/Objects/Texture.hh> #include <ACGL/OpenGL/Objects/Texture.hh>
...@@ -18,41 +18,38 @@ ...@@ -18,41 +18,38 @@
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class FrameBufferControl : public Resource::BasicCreateController<FrameBuffer> class FrameBufferObjectControl : public Resource::BasicCreateController<FrameBufferObject>
{ {
// ========================================================================================================= \/ // ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
FrameBufferControl(void) FrameBufferObjectControl(void)
: mWidth(0), : mColorAttachments(),
mHeight(0),
mColorAttachments(),
mDepthAttachment() mDepthAttachment()
{ {
mDepthAttachment.name = ""; mDepthAttachment.name = "";
mDepthAttachment.texture = SharedTexture(); mDepthAttachment.texture = SharedTexture();
mDepthAttachment.renderBuffer = SharedRenderBuffer(); mDepthAttachment.renderBuffer = SharedRenderBuffer();
} }
virtual ~FrameBufferControl() {} virtual ~FrameBufferObjectControl() {}
// ==================================================================================================== \/ // ==================================================================================================== \/
// ============================================================================================ METHODS \/ // ============================================================================================ METHODS \/
// ==================================================================================================== \/ // ==================================================================================================== \/
public: public:
inline FrameBufferControl& size (GLsizei _width, GLsizei _height) { mWidth = _width; mHeight = _height; return *this; } inline FrameBufferObjectControl& depthTexture (const SharedTexture& _pDepthTexture) { mDepthAttachment.texture = _pDepthTexture; return *this; }
inline FrameBufferControl& depthTexture (const SharedTexture& _pDepthTexture) { mDepthAttachment.texture = _pDepthTexture; return *this; } inline FrameBufferObjectControl& depthRenderBuffer (const SharedRenderBuffer& _pDepthRenderBuffer) { mDepthAttachment.renderBuffer = _pDepthRenderBuffer; return *this; }
inline FrameBufferControl& depthRenderBuffer (const SharedRenderBuffer& _pDepthRenderBuffer) { mDepthAttachment.renderBuffer = _pDepthRenderBuffer; return *this; }
inline FrameBufferControl& colorTexture(const std::string& _name, const SharedTexture& _texture) inline FrameBufferObjectControl& colorTexture(const std::string& _name, const SharedTexture& _texture)
{ {
FrameBuffer::Attachment attachment = {_name, _texture, SharedRenderBuffer()}; FrameBufferObject::Attachment attachment = {_name, _texture, SharedRenderBuffer()};
mColorAttachments.push_back(attachment); mColorAttachments.push_back(attachment);
return *this; return *this;
} }
inline FrameBufferControl& colorRenderBuffer(const std::string& _name, const SharedRenderBuffer& _renderBuffer) inline FrameBufferObjectControl& colorRenderBuffer(const std::string& _name, const SharedRenderBuffer& _renderBuffer)
{ {
FrameBuffer::Attachment attachment = {_name, SharedTexture(), _renderBuffer}; FrameBufferObject::Attachment attachment = {_name, SharedTexture(), _renderBuffer};
mColorAttachments.push_back(attachment); mColorAttachments.push_back(attachment);
return *this; return *this;
} }
...@@ -61,16 +58,14 @@ public: ...@@ -61,16 +58,14 @@ public:
// ============================================================================================ OVERRIDE \/ // ============================================================================================ OVERRIDE \/
// ===================================================================================================== \/ // ===================================================================================================== \/
public: public:
virtual SharedFrameBuffer create (void); virtual SharedFrameBufferObject create (void);
// =================================================================================================== \/ // =================================================================================================== \/
// ============================================================================================ FIELDS \/ // ============================================================================================ FIELDS \/
// =================================================================================================== \/ // =================================================================================================== \/
protected: protected:
GLsizei mWidth; FrameBufferObject::AttachmentVec mColorAttachments;
GLsizei mHeight; FrameBufferObject::Attachment mDepthAttachment;
FrameBuffer::AttachmentVec mColorAttachments;
FrameBuffer::Attachment mDepthAttachment;
}; };
} // OpenGL } // OpenGL
......
...@@ -92,4 +92,4 @@ protected: ...@@ -92,4 +92,4 @@ protected:
} // OpenGL } // OpenGL
} // ACGL } // ACGL
#endif // ACGL_OPENGL_CONTROLLER_ShaderProgramObjectControl_HH #endif // ACGL_OPENGL_CONTROLLER_SHADERPROGRAMOBJECTCONTROL_HH
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class StateControl : public Resource::BasicCreateController<Texture> class StateControl : public Resource::BasicCreateController<State>
{ {
// ========================================================================================================= \/ // ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
StateControl( StateControl(
const ConstSharedVertexBuffer& _vertexBuffer, const ConstSharedVertexBufferObject& _vertexBufferObject,
const ConstSharedVertexBuffer& _frameBuffer, const ConstSharedFrameBufferObject& _frameBufferObject,
const ConstSharedVertexBuffer& _shaderProgram, const ConstSharedShaderProgram& _shaderProgram,
const ConstSharedVertexBuffer& _viewport) const ConstSharedViewport& _viewport)
: mpVertexBuffer(_vertexBuffer), : mpVertexBufferObject(_vertexBufferObject),
mpFrameBuffer(_frameBuffer), mpFrameBufferObject(_frameBufferObject),
mpShaderProgram(_shaderProgram), mpShaderProgram(_shaderProgram),
mpViewport(_viewport) mpViewport(_viewport)
{} {}
...@@ -37,10 +37,10 @@ public: ...@@ -37,10 +37,10 @@ public:
// ============================================================================================ GETTERS \/ // ============================================================================================ GETTERS \/
// ==================================================================================================== \/ // ==================================================================================================== \/
public: public:
inline StateControl& vertexBuffer (const ConstSharedVertexBuffer& _vertexBuffer) { mpVertexBuffer = _vertexBuffer; return *this; } inline StateControl& vertexBuffer (const ConstSharedVertexBufferObject& _vertexBufferObject) { mpVertexBufferObject = _vertexBufferObject; return *this; }
inline StateControl& frameBuffer (const ConstSharedFrameBuffer& _frameBuffer) { mpFrameBuffer = _frameBuffer; return *this; } inline StateControl& frameBuffer (const ConstSharedFrameBufferObject& _frameBufferObject) { mpFrameBufferObject = _frameBufferObject; return *this; }
inline StateControl& shaderProgram (const ConstSharedShaderProgram& _shaderProgram) { mpShaderProgram = _shaderProgram; return *this; } inline StateControl& shaderProgram (const ConstSharedShaderProgram& _shaderProgram) { mpShaderProgram = _shaderProgram; return *this; }
inline StateControl& viewport (const ConstSharedShaderProgram& _viewport) { mpViewport = _viewport; return *this; } inline StateControl& viewport (const ConstSharedViewport& _viewport) { mpViewport = _viewport; return *this; }
// ===================================================================================================== \/ // ===================================================================================================== \/
// ============================================================================================ OVERRIDE \/ // ============================================================================================ OVERRIDE \/
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
public: public:
virtual SharedState create(void) virtual SharedState create(void)
{ {
SharedState state(new State(mpVertexBuffer, mpFrameBuffer, mpShaderProgram, mpViewport)); SharedState state(new State(mpVertexBufferObject, mpFrameBufferObject, mpShaderProgram, mpViewport));
return state; return state;
} }
...@@ -57,10 +57,10 @@ public: ...@@ -57,10 +57,10 @@ public:
// ============================================================================================ FIELDS \/ // ============================================================================================ FIELDS \/
// =================================================================================================== \/ // =================================================================================================== \/
protected: protected:
ConstSharedVertexBuffer mpVertexBuffer; ConstSharedVertexBufferObject mpVertexBufferObject;
ConstSharedFrameBuffer mpFrameBuffer; ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedShaderProgram mpShaderProgram; ConstSharedShaderProgram mpShaderProgram;
ConstSharedViewport mpViewport; ConstSharedViewport mpViewport;
}; };
} // OpenGL } // OpenGL
......
...@@ -3,19 +3,19 @@ ...@@ -3,19 +3,19 @@
// All rights reserved. // // All rights reserved. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROL_HH #ifndef ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROL_HH #define ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROL_HH
#include <ACGL/ACGL.hh> #include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicCreateController.hh> #include <ACGL/Resource/BasicCreateController.hh>
#include <ACGL/OpenGL/Objects/VertexBuffer.hh> #include <ACGL/OpenGL/Objects/VertexBufferObject.hh>
#include <ACGL/OpenGL/GL.hh> #include <ACGL/OpenGL/GL.hh>
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class VertexBufferControl : public Resource::BasicCreateController<VertexBuffer> class VertexBufferObjectControl : public Resource::BasicCreateController<VertexBufferObject>
{ {
// ==================================================================================================== \/ // ==================================================================================================== \/
// ============================================================================================ STRUCTS \/ // ============================================================================================ STRUCTS \/
...@@ -38,29 +38,29 @@ public: ...@@ -38,29 +38,29 @@ public:
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
VertexBufferControl(void) VertexBufferObjectControl(void)
: Resource::BasicCreateController<VertexBuffer>(), : Resource::BasicCreateController<VertexBufferObject>(),
mpElementArrayBuffer(), mpElementArrayBuffer(),
mArrayBuffers(), mArrayBuffers(),
mAttributeDefines() mAttributeDefines()
{} {}
virtual ~VertexBufferControl() {} virtual ~VertexBufferObjectControl() {}
// ==================================================================================================== \/ // ==================================================================================================== \/
// ============================================================================================ METHODS \/ // ============================================================================================ METHODS \/
// ==================================================================================================== \/ // ==================================================================================================== \/
public: public:
inline VertexBufferControl& index (const SharedElementArrayBuffer& _elementArrayBuffer) { mpElementArrayBuffer = _elementArrayBuffer; return *this; } inline VertexBufferObjectControl& index (const SharedElementArrayBuffer& _elementArrayBuffer) { mpElementArrayBuffer = _elementArrayBuffer; return *this; }
inline VertexBufferControl& data (const SharedArrayBuffer& _vertexBuffer) { mArrayBuffers.push_back(_vertexBuffer); return *this; } inline VertexBufferObjectControl& data (const SharedArrayBuffer& _vertexBuffer) { mArrayBuffers.push_back(_vertexBuffer); return *this; }
inline VertexBufferControl& attribute (const std::string& _name, const std::string& _nameInArray) inline VertexBufferObjectControl& attribute (const std::string& _name, const std::string& _nameInArray)
{ {
AttributeDefine a = {_name, mArrayBuffers.size()-1, _nameInArray}; AttributeDefine a = {_name, mArrayBuffers.size()-1, _nameInArray};
mAttributeDefines.push_back(a); mAttributeDefines.push_back(a);
return *this; return *this;
} }
inline VertexBufferControl& attribute (const std::string& _name, int_t _bufferID, const std::string& _nameInArray) inline VertexBufferObjectControl& attribute (const std::string& _name, int_t _bufferID, const std::string& _nameInArray)
{ {
AttributeDefine a = {_name, _bufferID, _nameInArray}; AttributeDefine a = {_name, _bufferID, _nameInArray};
mAttributeDefines.push_back(a); mAttributeDefines.push_back(a);
...@@ -71,18 +71,18 @@ public: ...@@ -71,18 +71,18 @@ public:
// ============================================================================================ OVERRIDE \/ // ============================================================================================ OVERRIDE \/
// ===================================================================================================== \/ // ===================================================================================================== \/
public: public:
virtual SharedVertexBuffer create(void); virtual SharedVertexBufferObject create(void);
// =================================================================================================== \/ // =================================================================================================== \/
// ============================================================================================ FIELDS \/ // ============================================================================================ FIELDS \/
// =================================================================================================== \/ // =================================================================================================== \/
protected: protected:
SharedElementArrayBuffer mpElementArrayBuffer; SharedElementArrayBuffer mpElementArrayBuffer;
VertexBuffer::ArrayBufferVec mArrayBuffers; VertexBufferObject::ArrayBufferVec mArrayBuffers;
AttributeDefineVec mAttributeDefines; AttributeDefineVec mAttributeDefines;
}; };
} // OpenGL } // OpenGL
} // ACGL } // ACGL
#endif // ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROL_HH #endif // ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROL_HH
...@@ -3,42 +3,42 @@ ...@@ -3,42 +3,42 @@
// All rights reserved. // // All rights reserved. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROLFILEOBJ_HH #ifndef ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROLFILEOBJ_HH
#define ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROLFILEOBJ_HH #define ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROLFILEOBJ_HH
#include <ACGL/ACGL.hh> #include <ACGL/ACGL.hh>
#include <ACGL/Resource/FileController.hh> #include <ACGL/Resource/FileController.hh>
#include <ACGL/Base/Settings.hh> #include <ACGL/Base/Settings.hh>
#include <ACGL/OpenGL/Objects/VertexBuffer.hh> #include <ACGL/OpenGL/Objects/VertexBufferObject.hh>
#include <ACGL/OpenGL/GL.hh> #include <ACGL/OpenGL/GL.hh>
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class VertexBufferControlFileOBJ : public Resource::FileController<VertexBuffer> class VertexBufferObjectControlFileOBJ : public Resource::FileController<VertexBufferObject>
{ {
// ========================================================================================================= \/ // ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
VertexBufferControlFileOBJ(const std::string& _filename) VertexBufferObjectControlFileOBJ(const std::string& _filename)
: Resource::FileController<VertexBuffer>(_filename, Base::Settings::the()->getFullGeometryPath()) : Resource::FileController<VertexBufferObject>(_filename, Base::Settings::the()->getFullGeometryPath())
{} {}
virtual ~VertexBufferControlFileOBJ() {} virtual ~VertexBufferObjectControlFileOBJ() {}
private: private:
bool loadOBJ(SharedVertexBuffer& vertexBuffer); bool loadOBJ(SharedVertexBufferObject& vertexBuffer);
// ===================================================================================================== \/ // ===================================================================================================== \/
// ============================================================================================ OVERRIDE \/ // ============================================================================================ OVERRIDE \/
// ===================================================================================================== \/ // ===================================================================================================== \/
public: public:
virtual SharedVertexBuffer create(void); virtual SharedVertexBufferObject create(void);
virtual bool update(SharedVertexBuffer& vertexBuffer); virtual bool update(SharedVertexBufferObject& vertexBuffer);
}; };
} // OpenGL } // OpenGL
} // ACGL } // ACGL
#endif // ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROLFILEOBJ_HH #endif // ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROLFILEOBJ_HH
...@@ -21,25 +21,30 @@ ...@@ -21,25 +21,30 @@
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
typedef Resource::NameManager<ArrayBuffer> ArrayBufferNameManager;
typedef Resource::NameManager<ElementArrayBuffer> ElementArrayBufferNameManager;
typedef Resource::NameManager<FrameBufferObject> FrameBufferObjectNameManager;
typedef Resource::NameManager<RenderBuffer> RenderBufferNameManager;
typedef Resource::NameManager<Shader> ShaderNameManager; typedef Resource::NameManager<Shader> ShaderNameManager;
typedef Resource::FileManager<Shader> ShaderFileManager; typedef Resource::FileManager<Shader> ShaderFileManager;
typedef Resource::NameManager<ShaderProgram> ShaderProgramNameManager; typedef Resource::NameManager<ShaderProgram> ShaderProgramNameManager;
typedef Resource::FileManager<ShaderProgram> ShaderProgramFileManager; typedef Resource::FileManager<ShaderProgram> ShaderProgramFileManager;
typedef Resource::NameManager<Texture> TextureNameManager; typedef Resource::NameManager<ShaderProgramObject> ShaderProgramObjectNameManager;
typedef Resource::FileManager<Texture> TextureFileManager;
typedef Resource::NameManager<FrameBuffer> FrameBufferNameManager;
typedef Resource::NameManager<RenderBuffer> RenderBufferNameManager; typedef Resource::NameManager<SharedState> StateNameManager;
typedef Resource::NameManager<VertexBuffer> VertexBufferNameManager; typedef Resource::NameManager<Texture> TextureNameManager;
typedef Resource::FileManager<VertexBuffer> VertexBufferFileManager; typedef Resource::FileManager<Texture> TextureFileManager;
typedef Resource::NameManager<ArrayBuffer> ArrayBufferNameManager; typedef Resource::NameManager<VertexBufferObject> VertexBufferObjectNameManager;
typedef Resource::FileManager<VertexBufferObject> VertexBufferObjectFileManager;
typedef Resource::NameManager<ElementArrayBuffer> ElementArrayBufferNameManager;
} // OpenGL } // OpenGL
} // ACGL } // ACGL
......
...@@ -12,14 +12,18 @@ ...@@ -12,14 +12,18 @@
#include <ACGL/ACGL.hh> #include <ACGL/ACGL.hh>
#include <ACGL/OpenGL/Objects/ArrayBuffer.hh>
#include <ACGL/OpenGL/Objects/ElementArrayBuffer.hh>
#include <ACGL/OpenGL/Objects/FrameBufferObject.hh>
#include <ACGL/OpenGL/Objects/RenderBuffer.hh>
#include <ACGL/OpenGL/Objects/Shader.hh> #include <ACGL/OpenGL/Objects/Shader.hh>
#include <ACGL/OpenGL/Objects/ShaderProgram.hh> #include <ACGL/OpenGL/Objects/ShaderProgram.hh>
#include <ACGL/OpenGL/Objects/ShaderProgramObject.hh>
#include <ACGL/OpenGL/Objects/State.hh>
#include <ACGL/OpenGL/Objects/Texture.hh> #include <ACGL/OpenGL/Objects/Texture.hh>
#include <ACGL/OpenGL/Objects/FrameBuffer.hh> #include <ACGL/OpenGL/Objects/Uniform.hh>
#include <ACGL/OpenGL/Objects/RenderBuffer.hh> #include <ACGL/OpenGL/Objects/VertexBufferObject.hh>
#include <ACGL/OpenGL/Objects/VertexBuffer.hh> #include <ACGL/OpenGL/Objects/Viewport.hh>
#include <ACGL/OpenGL/Objects/ArrayBuffer.hh>
#include <ACGL/OpenGL/Objects/ElementArrayBuffer.hh>
#endif // ACGL_OPENGL_OBJECTS_HH #endif // ACGL_OPENGL_OBJECTS_HH
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
// All rights reserved. // // All rights reserved. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_OPENGL_OBJECTS_FRAMEBUFFER_HH #ifndef ACGL_OPENGL_OBJECTS_FRAMEBUFFEROBJECT_HH
#define ACGL_OPENGL_OBJECTS_FRAMEBUFFER_HH #define ACGL_OPENGL_OBJECTS_FRAMEBUFFEROBJECT_HH
/* /*
* This FrameBuffer class encapsulates an OpenGL frame buffer object (FBO). * This FrameBufferObject class encapsulates an OpenGL frame buffer object (FBO).
* A FrameBuffer is a target for rendering and thus consists of different "layers": * A FrameBufferObject is a target for rendering and thus consists of different "layers":
* *
* one or no depthbuffer * one or no depthbuffer
* one or no stencilbuffer * one or no stencilbuffer
* one (OpenGL ES) to many (hardware dependent limit) colorbuffers * one (OpenGL ES) to many (hardware dependent limit) colorbuffers
* *
* These buffers get attached to the FrameBuffer. * These buffers get attached to the FrameBufferObject.
* *
* There exists one system-provided frame buffer object for rendering to the screen * There exists one system-provided frame buffer object for rendering to the screen
* and optionaly multiple user defined frame buffer objects for offscreen rendering. * and optionaly multiple user defined frame buffer objects for offscreen rendering.
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class FrameBuffer class FrameBufferObject
{ {
ACGL_NOT_COPYABLE(FrameBuffer) ACGL_NOT_COPYABLE(FrameBufferObject)
// =================================================================================================== \/ // =================================================================================================== \/
// ============================================================================================ STATIC \/ // ============================================================================================ STATIC \/
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
FrameBuffer(GLsizei _width, GLsizei _height) FrameBufferObject(void)
: mContext(0), : mContext(0),