5 #ifndef BALL_VIEW_RENDERING_RENDERTARGET_H 6 #define BALL_VIEW_RENDERING_RENDERTARGET_H 13 #include <boost/smart_ptr.hpp> 14 #include <boost/shared_array.hpp> 59 pitch(width * pixelFormat.computeByteSize()),
60 pixelFormat(pixelFormat)
69 pixelFormat(pixelFormat)
76 return width==format.width
78 && pitch==format.pitch
79 && pixelFormat==format.pixelFormat;
84 return !(*
this == format);
109 void setPitch(
unsigned int pitch) { this->pitch = pitch; }
117 this->pixelFormat = pixelFormat;
126 return isValid() ? (getPitch() * getHeight()) : 0;
132 this->
width = newWidth;
204 void setData(
void *data) { this->data = data; }
249 virtual void releaseBuffer(FrameBufferPtr buffer) = 0;
253 virtual bool init() = 0;
257 virtual bool resize(
const unsigned int width,
const unsigned int height) = 0;
261 virtual void refresh() = 0;
265 virtual void prepareRendering() = 0;
277 virtual bool doNotResize()
const = 0;
284 #endif // BALL_VIEW_RENDERING_RENDERTARGET_H
const FrameBufferFormat & getFormat() const
const void * getData() const
std::vector< FrameBufferFormat > BufferFormatList
boost::shared_ptr< FrameBuffer > FrameBufferPtr
FrameBuffer(void *data, const FrameBufferFormat &format)
virtual void setupStereo(float, float)
-*- Mode: C++; tab-width: 2; -*-
std::ostream & operator<<(std::ostream &o, const PixelFormat &f)
void setFormat(const FrameBufferFormat &format)
Resolution(Size width, Size height)