BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
buffer.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/ba3d/view/buffer.h
6 //! @brief Defines Buffer class
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_BA3D_VIEW_BUFFER_H
16 #define BORNAGAIN_GUI_BA3D_VIEW_BUFFER_H
17 
18 #include "GUI/ba3d/def.h"
19 #include <QOpenGLBuffer>
20 #include <QOpenGLFunctions>
21 #include <QOpenGLVertexArrayObject>
22 
23 namespace GUI::RealSpace {
24 
25 class Geometry;
26 
27 //! GL buffer
28 class Buffer final : protected QOpenGLFunctions {
29 public:
30  Buffer(Geometry const&);
31  void draw();
32 
33 private:
35  QOpenGLVertexArrayObject m_vao;
36  QOpenGLBuffer m_glBuffer;
37 };
38 
39 //! Buffer for drawing 3D Coordinate Axes on canvas
40 class Buffer3DAxes final : protected QOpenGLFunctions {
41 public:
42  Buffer3DAxes();
43  void draw3DAxes();
44 
45 private:
47  QOpenGLVertexArrayObject m_vao3DAxes;
48  QOpenGLBuffer m_glBuffer3DAxes;
49 };
50 
51 } // namespace GUI::RealSpace
52 
53 #endif // BORNAGAIN_GUI_BA3D_VIEW_BUFFER_H
Buffer for drawing 3D Coordinate Axes on canvas.
Definition: buffer.h:40
QOpenGLVertexArrayObject m_vao3DAxes
Definition: buffer.h:47
QOpenGLBuffer m_glBuffer3DAxes
Definition: buffer.h:48
GL buffer.
Definition: buffer.h:28
QOpenGLVertexArrayObject m_vao
Definition: buffer.h:35
Buffer(Geometry const &)
Definition: buffer.cpp:27
QOpenGLBuffer m_glBuffer
Definition: buffer.h:36
Definitions in namespace GUI::RealSpace.