summaryrefslogtreecommitdiff
path: root/common/glwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/glwindow.h')
-rw-r--r--common/glwindow.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/glwindow.h b/common/glwindow.h
index 8559c4b..caba367 100644
--- a/common/glwindow.h
+++ b/common/glwindow.h
@@ -7,6 +7,11 @@ class GLWindow
GLWindow (GLWindow *share);
virtual ~GLWindow ();
+ void IncRef ()
+ { m_nRef++; }
+ void DecRef ()
+ { m_nRef--; if (m_nRef == 0) delete this; }
+
bool Create (void* data);
void DestroyContext ();
@@ -38,6 +43,7 @@ class GLWindow
private:
void *m_pData;
GLWindow *m_pShare;
+ int m_nRef;
};
#endif // _GLWINDOW_H_