CVB++ 14.0
OpenGLImageRendererFactory Class Referencefinal

Factory to create an OpenGL based image renderer. More...

#include <cvb/ui/opengl_image_renderer_factory.hpp>

Static Public Member Functions

static std::unique_ptr< OpenGLImageRendererCreateRenderer (int version)
 Create a renderer. More...
 
static QSurfaceFormat CreateFormat (int version)
 Create a OpenGL format for the given version. More...
 
static bool TryVersion (int version) noexcept
 Test if a OpenGL version is implemented on your system. More...
 
static bool TryVersion (int version, QSurfaceFormat &format) noexcept
 Test if a OpenGL version is implemented on your system. More...
 
static String VendorName (int version)
 Get the name of the OpenGL vendor. More...
 
static String RendererName (int version)
 Gets the name of the OpenGL renderer. More...
 

Detailed Description

Factory to create an OpenGL based image renderer.

Creates an CvbQtGLImageRenderer based on the CvbRenderEngeine provided. In order to create a renderer a suitable context must be current.

Note
The use of this class is an advanced topic and requires significant knowledge about Qt and OpenGL!

Member Function Documentation

◆ CreateFormat()

QSurfaceFormat CreateFormat ( int  version)
inlinestatic

Create a OpenGL format for the given version.

Parameters
[in]versionThe required version number either 2 or 3.
Returns
The surface format.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CreateRenderer()

std::unique_ptr< OpenGLImageRenderer > CreateRenderer ( int  version)
inlinestatic

Create a renderer.

Parameters
[in]versionThe required version number either 2 or 3.
Returns
A pointer to the renderer.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ RendererName()

String RendererName ( int  version)
inlinestatic

Gets the name of the OpenGL renderer.

Parameters
[in]versionVersion of the requested implementation (2 or 3).
Returns
String containing the name of the rendering device e.g. your GPU name, but might also be the name of a software implementation.
Exceptions
Anyexception derived from std::exception including CvbException.
Examples
Cvb/QtDisplayAdvanced.

◆ TryVersion() [1/2]

bool TryVersion ( int  version)
inlinestaticnoexcept

Test if a OpenGL version is implemented on your system.

Parameters
[in]versionVersion to test for (2 or 3)
Returns
True is version is available, false otherwise.
Exceptions
Anyexception derived from std::exception including CvbException.
Doesnot throw any exception.

◆ TryVersion() [2/2]

bool TryVersion ( int  version,
QSurfaceFormat format 
)
inlinestaticnoexcept

Test if a OpenGL version is implemented on your system.

Parameters
[in]versionVersion to test for (2 or 3)
[out]formatA suitable format to create a context.
Returns
True is version is available, false otherwise.
Exceptions
Doesnot throw any exception.

◆ VendorName()

String VendorName ( int  version)
inlinestatic

Get the name of the OpenGL vendor.

Parameters
[in]versionVersion of the requested implementation (2 or 3).
Returns
Vendor name for the renderer in use.
Exceptions
Anyexception derived from std::exception including CvbException.
Examples
Cvb/QtDisplayAdvanced.