-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ d8ea37a 🚀
- Loading branch information
Showing
5 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include <vtkObjectFactory.h> | ||
#include <vtkVersion.h> | ||
|
||
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 3, 20240914) | ||
#include <vtk_glad.h> | ||
#include <vtkglad/include/glad/glx.h> | ||
#else | ||
#include <vtk_glew.h> | ||
#endif | ||
|
||
#include "vtkF3DGLXRenderWindow.h" | ||
|
||
#include <X11/Xlib.h> | ||
|
||
//------------------------------------------------------------------------------ | ||
vtkF3DGLXRenderWindow::vtkF3DGLXRenderWindow() = default; | ||
|
||
//------------------------------------------------------------------------------ | ||
vtkF3DGLXRenderWindow::~vtkF3DGLXRenderWindow() = default; | ||
|
||
//------------------------------------------------------------------------------ | ||
vtkF3DGLXRenderWindow* vtkF3DGLXRenderWindow::New() | ||
{ | ||
// Check if the X display is available | ||
Display* dpy = XOpenDisplay(nullptr); | ||
if (dpy == nullptr) | ||
{ | ||
return nullptr; | ||
} | ||
XCloseDisplay(dpy); | ||
|
||
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 3, 20240914) | ||
// Load core glx functions | ||
gladLoaderLoadGLX(nullptr, 0); | ||
#endif | ||
|
||
VTK_STANDARD_NEW_BODY(vtkF3DGLXRenderWindow); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* @class vtkF3DGLXRenderWindow | ||
* @brief GLX context render window | ||
*/ | ||
|
||
#ifndef vtkF3DGLXRenderWindow_h | ||
#define vtkF3DGLXRenderWindow_h | ||
|
||
#include "vtkXOpenGLRenderWindow.h" | ||
|
||
class vtkF3DGLXRenderWindow : public vtkXOpenGLRenderWindow | ||
{ | ||
public: | ||
static vtkF3DGLXRenderWindow* New(); | ||
vtkTypeMacro(vtkF3DGLXRenderWindow, vtkXOpenGLRenderWindow); | ||
|
||
protected: | ||
vtkF3DGLXRenderWindow(); | ||
~vtkF3DGLXRenderWindow() override; | ||
|
||
private: | ||
vtkF3DGLXRenderWindow(const vtkF3DGLXRenderWindow&) = delete; | ||
void operator=(const vtkF3DGLXRenderWindow&) = delete; | ||
}; | ||
#endif // vtkF3DGLXRenderWindow_h |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.