Base class for OpenGL image renderer. More...
#include <cvb/ui/opengl_image_renderer.hpp>
Public Member Functions | |
void | UpdateMaping (const QRectF &sourceRect, Size2D< int > textureSize) noexcept |
Updates the vertex and texture coordinates before rendering. | |
void | Render (const QRectF &viewportRect) noexcept |
Actually renders the image. | |
OpenGLBufferFormat | BufferFormat () const noexcept |
Returns the current buffer format. | |
virtual void * | BeginBufferAccess (int &linePad) noexcept=0 |
Maps the pixel buffer to upload data. | |
virtual void | EndBufferAccess () noexcept=0 |
End the pixel buffer mapping. | |
virtual void | UpdateBufferFormat (const OpenGLBufferFormat &bufferFormat) noexcept=0 |
Updates the buffer format associated with the current rendering. | |
virtual bool | MonoUploadSupported () const noexcept=0 |
Check if a mono image can be uploaded without duplicating the date in the color channels. | |
Base class for OpenGL image renderer.
You dot need to use this class to render the image with CvbQtImageView. However this class is meant for convenient usage with a custom OpenGL context, in order to render the image to something different than CvbQtImageView. Please be aware that for all member function a QOpenGLContext must be current.
|
pure virtualnoexcept |
Maps the pixel buffer to upload data.
[out] | linePad | Line padding used by the current buffer format, for convenience. |
Does | not throw any exception. |
|
inlinenoexcept |
Returns the current buffer format.
Does | not throw any exception. |
|
pure virtualnoexcept |
End the pixel buffer mapping.
Does | not throw any exception. |
|
pure virtualnoexcept |
Check if a mono image can be uploaded without duplicating the date in the color channels.
Does | not throw any exception. |
|
inlinenoexcept |
Actually renders the image.
[in] | viewportRect | Visible rectangle of the image. |
Does | not throw any exception. |
This method does not reset the OpenGL state, and does not clear anything. Make sure you are in a suitable state for rendering a texture.
|
pure virtualnoexcept |
Updates the buffer format associated with the current rendering.
[in] | bufferFormat | The new buffer format. |
Does | not throw any exception. |
|
inlinenoexcept |
Updates the vertex and texture coordinates before rendering.
[in] | sourceRect | Rectangle holding the vertex coordinates for the visible part of the texture. |
[in] | textureSize | Pixel size of the texture to adjust the texture coordinates for e.g. sub pixel scrolling. This is only relevant if vertex coordinates have a fractional part. |
Does | not throw any exception. |