forked from trlsmax/imgui-vtk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvtkImGuiSDL2OpenGLRenderWindow.h
41 lines (32 loc) · 1.23 KB
/
vtkImGuiSDL2OpenGLRenderWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* Copyright (C) 2020 Pablo Hernandez-Cerdan
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* @class vtkImGuiSDL2OpenGLRenderWindow
* @brief implements SDL2 specific functions to render with Imgui
*
*/
#ifndef vtkImGuiSDL2OpenGLRenderWindow_h
#define vtkImGuiSDL2OpenGLRenderWindow_h
#include "vtkSDL2OpenGLRenderWindow.h"
#include "vtkRenderingUIModule.h" // For export macro
class VTKRENDERINGUI_EXPORT vtkImGuiSDL2OpenGLRenderWindow : public vtkSDL2OpenGLRenderWindow
{
public:
/** Inherit constructors from base class */
using vtkSDL2OpenGLRenderWindow::vtkSDL2OpenGLRenderWindow;
/**
* Construct object so that light follows camera motion.
*/
static vtkImGuiSDL2OpenGLRenderWindow* New();
vtkTypeMacro(vtkImGuiSDL2OpenGLRenderWindow, vtkSDL2OpenGLRenderWindow);
/**
* Override to avoid calling
* SDL_GL_SwapWindow. The swap will be done in the app using Imgui.
* A termination method performed at the end of the rendering process
* to do things like swapping buffers (if necessary) or similar actions.
*/
void Frame() override;
};
#endif