X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglws.hpp;h=c76e19321706a5c8a02fca80dfcce7774ad2ce6f;hb=3801952b80cd7a7160f6410518f6e3740d461b60;hp=05903a7b55281b96b6d00058c844fe551a2b9f7e;hpb=06555614b7385c49964d27aaeec68dec6ff31744;p=apitrace diff --git a/retrace/glws.hpp b/retrace/glws.hpp index 05903a7..c76e193 100644 --- a/retrace/glws.hpp +++ b/retrace/glws.hpp @@ -31,7 +31,11 @@ #define _GLWS_HPP_ +#include + #include +#include +#include namespace glws { @@ -98,12 +102,14 @@ public: const Visual *visual; int width; int height; + bool pbuffer; bool visible; - Drawable(const Visual *vis, int w, int h) : + Drawable(const Visual *vis, int w, int h, bool pb) : visual(vis), width(w), height(h), + pbuffer(pb), visible(false) {} @@ -117,6 +123,7 @@ public: virtual void show(void) { + assert(!pbuffer); visible = true; } @@ -130,12 +137,18 @@ public: const Visual *visual; Profile profile; + std::set extensions; + Context(const Visual *vis, Profile prof) : visual(vis), profile(prof) {} virtual ~Context() {} + + // Context must be current + bool + hasExtension(const char *extension); }; @@ -149,7 +162,7 @@ Visual * createVisual(bool doubleBuffer = false, Profile profile = PROFILE_COMPAT); Drawable * -createDrawable(const Visual *visual, int width = 32, int height = 32); +createDrawable(const Visual *visual, int width, int height, bool pbuffer = false); Context * createContext(const Visual *visual, Context *shareContext = 0, Profile profile = PROFILE_COMPAT, bool debug = false);