X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glws.hpp;h=05654200f7d966d9f443b696a13c8ab8ffde68f6;hb=77ff98a6bc65e7ddf29e241e6b40e5ac63337871;hp=23de839da1260681e8fa42c7ed563291327065cc;hpb=7497c130f98f33f41437678835f4b2eb2abce750;p=apitrace diff --git a/glws.hpp b/glws.hpp index 23de839..0565420 100644 --- a/glws.hpp +++ b/glws.hpp @@ -53,11 +53,13 @@ public: const Visual *visual; int width; int height; + bool visible; Drawable(const Visual *vis, int w, int h) : visual(vis), width(w), - height(h) + height(h), + visible(false) {} virtual ~Drawable() {} @@ -68,6 +70,11 @@ public: height = h; } + virtual void + show(void) { + visible = true; + } + virtual void swapBuffers(void) = 0; }; @@ -94,10 +101,10 @@ public: createVisual(bool doubleBuffer = false) = 0; virtual Drawable * - createDrawable(const Visual *visual, int width = 256, int height = 256) = 0; + createDrawable(const Visual *visual, int width = 32, int height = 32) = 0; virtual Context * - createContext(const Visual *visual) = 0; + createContext(const Visual *visual, Context *shareContext = NULL) = 0; virtual bool makeCurrent(Drawable *drawable, Context *context) = 0;