diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-07 14:49:23 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-07 14:49:23 -0700 |
commit | f51bd7fcf17c474f106a2c14c00d527d3f8601a4 (patch) | |
tree | 2b5ae2d4816248767bf2e6a294f283c0ba4ef34b /common/headless_view.hpp | |
parent | 9b61e39ef33463ffa7cb2e987c39565f092e1890 (diff) | |
download | qtlocation-mapboxgl-f51bd7fcf17c474f106a2c14c00d527d3f8601a4.tar.gz |
first draft at glx headless rendering
[skip ci]
Diffstat (limited to 'common/headless_view.hpp')
-rw-r--r-- | common/headless_view.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/common/headless_view.hpp b/common/headless_view.hpp index b79b0c9746..57cdec5246 100644 --- a/common/headless_view.hpp +++ b/common/headless_view.hpp @@ -1,6 +1,15 @@ #ifndef LLMR_COMMON_HEADLESS_CGL #define LLMR_COMMON_HEADLESS_CGL +#ifdef __APPLE__ +#define LLMR_USE_CGL 1 +#define LLMR_CONTEXT_OBJ CGLContextObj +#else +#include <GL/glx.h> +#define LLMR_USE_GLX 1 +#define LLMR_CONTEXT_OBJ GLXContext +#endif + #include <llmr/map/view.hpp> #include <llmr/platform/gl.hpp> @@ -22,10 +31,20 @@ private: private: - CGLContextObj gl_context; + LLMR_CONTEXT_OBJ gl_context; + +#ifdef LLMR_USE_CGL GLuint fbo = 0; GLuint fbo_depth_stencil = 0; GLuint fbo_color = 0; +#endif + +#ifdef LLMR_USE_GLX + XVisualInfo *x_info = nullptr; + Display *x_display = nullptr; + Pixmap x_pixmap; + GLXPixmap glx_pixmap; +#endif }; } |