23 #include <eq/client/frame.h>
24 #include <eq/client/types.h>
28 namespace detail {
class Image; }
59 const uint32_t internalFormat );
127 EQ_API
void setZoom(
const Zoom& zoom );
130 EQ_API
const Zoom&
getZoom()
const;
142 const uint32_t name );
262 const float quality );
295 EQ_API
bool readback(
const uint32_t buffers,
const PixelViewport& pvp,
310 const PixelViewport& pvp,
const Zoom& zoom,
316 const GLEWContext* glewContext );
326 const GLEWContext* glewContext );
344 const Vector2i& position,
348 EQ_API
bool writeImage(
const std::string& filename,
352 EQ_API
bool writeImages(
const std::string& filenameTemplate )
const;
355 EQ_API
bool readImage(
const std::string& filename,
359 void setOffset( int32_t x, int32_t y );
368 EQ_API std::vector< uint32_t >
375 EQ_API std::vector< uint32_t >
376 findTransferers(
const Frame::Buffer buffer,
const GLEWContext* gl )
381 const uint32_t name );
386 const GLEWContext* glewContext );
389 EQ_API uint32_t getDownloaderName(
const Frame::Buffer buffer )
const;
393 detail::Image*
const _impl;
396 const void* _getBufferKey(
const Frame::Buffer buffer )
const;
399 const void* _getCompressorKey(
const Frame::Buffer buffer )
const;
412 const uint32_t externalFormat,
413 const uint32_t pixelSize,
414 const bool hasAlpha );
416 bool _readback(
const Frame::Buffer buffer,
const Zoom& zoom,
419 bool _startReadback(
const Frame::Buffer buffer,
const Zoom& zoom,
422 void _finishReadback(
const Frame::Buffer buffer,
const Zoom& zoom,
423 const GLEWContext* glewContext );
425 bool _readbackZoom(
const Frame::Buffer buffer,
const Zoom& zoom,
bool getAlphaUsage() const
const PixelData & compressPixelData(const Frame::Buffer)
bool upload(const Frame::Buffer buffer, util::Texture *texture, const Vector2i &position, ObjectManager *glObjects) const
Upload this image to the frame buffer or a texture.
Frame::Type getStorageType() const
const PixelData & getPixelData(const Frame::Buffer) const
float getQuality(const Frame::Buffer buffer) const
void setStorageType(const Frame::Type type)
Set the frame pixel storage type.
The pixel data structure manages the pixel information for images.
void setInternalFormat(const Frame::Buffer buffer, const uint32_t internalFormat)
Set the internal format for the given buffer.
void setZoom(const Zoom &zoom)
Sets the zoom factor to be used for compositing.
const Zoom & getZoom() const
void setPixelData(const Frame::Buffer buffer, const PixelData &data)
Set the pixel data of the given image buffer.
const util::Texture & getTexture(const Frame::Buffer buffer) const
Get the texture of this image.
A facility class to manage OpenGL objects across shared contexts.
bool readImage(const std::string &filename, const Frame::Buffer buffer)
Read pixel data from an uncompressed rgb image file.
bool writeImage(const std::string &filename, const Frame::Buffer buffer) const
Write the pixel data as rgb image file.
uint32_t getExternalFormat(const Frame::Buffer buffer) const
Get the external format of the given buffer.
void flush()
Free all cached data of this image.
void setQuality(const Frame::Buffer buffer, const float quality)
Set the minimum quality after a full download-compression path.
uint32_t getPixelDataSize(const Frame::Buffer buffer) const
void deleteGLObjects(ObjectManager *om)
Delete all OpenGL objects allocated from the given object manager.
void setAlphaUsage(const bool enabled)
Set alpha data preservation during download and compression.
bool hasPixelData(const Frame::Buffer buffer) const
bool readback(const uint32_t buffers, const PixelViewport &pvp, const Zoom &zoom, ObjectManager *glObjects)
Read back an image from the frame buffer.
void resetPlugins()
Deallocate all transfer and compression plugins.
void setPixelViewport(const PixelViewport &pvp)
Set the internal pixel viewport of the image.
const uint8_t * getPixelPointer(const Frame::Buffer buffer) const
void reset()
Reset the image to its default state.
void validatePixelData(const Frame::Buffer buffer)
Allocate an image buffer without initialization.
void finishReadback(const Zoom &zoom, const GLEWContext *glewContext)
Finish an asynchronous readback.
A wrapper around OpenGL textures.
Buffer
The buffer format defines which components of the frame are to be used during readback and assembly...
bool hasTextureData(const Frame::Buffer buffer) const
void useCompressor(const Frame::Buffer buffer, const uint32_t name)
Set a compressor to be used during transmission of the image.
bool hasAsyncReadback() const
Image()
Construct a new Image.
bool writeImages(const std::string &filenameTemplate) const
Write all valid pixel data as separate images.
void clearPixelData(const Frame::Buffer buffer)
Clear and validate an image buffer.
virtual ~Image()
Destruct the Image.
bool startReadback(const uint32_t buffers, const PixelViewport &pvp, const Zoom &zoom, ObjectManager *glObjects)
Start reading back an image from the frame buffer.
const PixelViewport & getPixelViewport() const
uint32_t getInternalFormat(const Frame::Buffer buffer) const
uint32_t getPixelSize(const Frame::Buffer buffer) const
Get the size, in bytes, of one pixel in the external pixel data.
Type
The storage type for pixel data.