X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glws.hpp;h=9afebf4b878a4b639863bb08d8bf12927fbd0495;hb=93911de1f9909f1c9c8e10a8745c66fa6c27cc63;hp=d6c2003e0c90ae873c0743057725214152017e3b;hpb=ba22603848891d875649bcddcc6d39da43b69429;p=apitrace diff --git a/glws.hpp b/glws.hpp index d6c2003..9afebf4 100644 --- a/glws.hpp +++ b/glws.hpp @@ -37,6 +37,15 @@ namespace glws { +enum Profile { + PROFILE_COMPAT = 0, + PROFILE_CORE, + PROFILE_ES1, + PROFILE_ES2, + PROFILE_MAX +}; + + extern bool debug; @@ -122,9 +131,11 @@ class Context { public: const Visual *visual; + Profile profile; - Context(const Visual *vis) : - visual(vis) + Context(const Visual *vis, Profile prof) : + visual(vis), + profile(prof) {} virtual ~Context() {} @@ -138,13 +149,13 @@ void cleanup(void); Visual * -createVisual(bool doubleBuffer = false); +createVisual(bool doubleBuffer = false, Profile profile = PROFILE_COMPAT); Drawable * createDrawable(const Visual *visual, int width = 32, int height = 32); Context * -createContext(const Visual *visual, Context *shareContext = 0); +createContext(const Visual *visual, Context *shareContext = 0, Profile profile = PROFILE_COMPAT); bool makeCurrent(Drawable *drawable, Context *context);