LibCarna Version 3.4.0
Loading...
Searching...
No Matches
QGLContextHolder.hpp
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#pragma once
16
17#include <LibCarna/LibCarna.hpp>
18#include <QGLFormat>
19
20class QGLFormat;
21class QGLPixelBuffer;
22
23namespace LibCarna
24{
25
26namespace testing
27{
28
29
30
31// ----------------------------------------------------------------------------------
32// QGLContextHolder
33// ----------------------------------------------------------------------------------
34
35class QGLContextHolder
36{
37
38 const std::unique_ptr< QGLPixelBuffer > pbuffer;
39
40 const std::unique_ptr< LibCarna::base::GLContext > glContextWrapper;
41
42 const static QGLFormat format;
43
44 static LibCarna::base::GLContext* createGLContextWrapper( QGLPixelBuffer& );
45
46public:
47
48 QGLContextHolder();
49
50 LibCarna::base::GLContext& glContext();
51
52}; // QGLContextHolder
53
54
55
56} // namespace testing
57
58} // namespace LibCarna
Contains forward-declarations.
Wraps and represents an OpenGL context.
Definition GLContext.hpp:66