diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-08-17 09:49:43 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-08-17 09:49:43 +0000 |
| commit | 51d67574ecae4a7e898a854b23b79be59197cc4e (patch) | |
| tree | a40de38ebf1471fca6f68181b107eba5719de5c2 /FL | |
| parent | ef48f007a1a8463abfccb118a6836718d497eb29 (diff) | |
New context_changed() function for OpenGL windows allowing efficient texture loading (str #1372)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5322 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Gl_Window.H | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index 2ef824a94..d13b832ca 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -41,7 +41,7 @@ class FL_EXPORT Fl_Gl_Window : public Fl_Window { const int *alist; Fl_Gl_Choice *g; GLContext context_; - char valid_; + char valid_f_; char damage1_; // damage() of back buffer virtual void draw_overlay(); void init(); @@ -61,10 +61,13 @@ public: void hide(); void resize(int,int,int,int); - char valid() const {return valid_;} - void valid(char v) {valid_ = v;} + char valid() const {return valid_f_ & 1;} + void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;} void invalidate(); + char context_valid() const {return valid_f_ & 2;} + void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;} + static int can_do(int m) {return can_do(m,0);} static int can_do(const int *m) {return can_do(0, m);} int can_do() {return can_do(mode_,alist);} |
