25 #ifndef WGEOFFSCREENRENDERPASS_H
26 #define WGEOFFSCREENRENDERPASS_H
31 #include <osg/FrameBufferObject>
33 #include "../WGEUtils.h"
34 #include "../WGETexture.h"
50 typedef osg::ref_ptr< WGEOffscreenRenderPass >
RefPtr;
55 typedef osg::ref_ptr< const WGEOffscreenRenderPass >
ConstRefPtr;
79 WGEOffscreenRenderPass(
size_t textureWidth,
size_t textureHeight, osg::ref_ptr< WGETextureHud > hud, std::string name,
int num = 0 );
94 void attach( BufferComponent buffer, osg::ref_ptr< osg::Texture2D > texture );
108 osg::ref_ptr< osg::Texture2D >
attach( BufferComponent buffer, GLint internalFormat = GL_RGBA );
117 void detach( BufferComponent buffer );
126 template <
typename T >
127 void bind( osg::ref_ptr< T > texture,
size_t unit = 0 );
136 osg::ref_ptr< osg::Texture2D >
createTexture( GLint internalFormat = GL_RGBA );
173 virtual void addUniform( osg::ref_ptr< osg::Uniform > uniform );
188 osg::ref_ptr<osg::FrameBufferObject>
m_fbo;
193 osg::ref_ptr< WGETextureHud >
m_hud;
202 template <
typename T >
208 #endif // WGEOFFSCREENRENDERPASS_H