Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50047 - sandbox/guigl/libs/guigl/src
From: stipe_at_[hidden]
Date: 2008-12-01 00:22:39


Author: srajko
Date: 2008-12-01 00:22:37 EST (Mon, 01 Dec 2008)
New Revision: 50047
URL: http://svn.boost.org/trac/boost/changeset/50047

Log:
made window map not static
Text files modified:
   sandbox/guigl/libs/guigl/src/window.cpp | 16 +++++++---------
   1 files changed, 7 insertions(+), 9 deletions(-)

Modified: sandbox/guigl/libs/guigl/src/window.cpp
==============================================================================
--- sandbox/guigl/libs/guigl/src/window.cpp (original)
+++ sandbox/guigl/libs/guigl/src/window.cpp 2008-12-01 00:22:37 EST (Mon, 01 Dec 2008)
@@ -40,7 +40,7 @@
             glEnable(GL_DEPTH_TEST);
         else
             glDisable(GL_DEPTH_TEST);
- s_windows[id] = impl;
+ m_windows[id] = impl;
         
                glutDisplayFunc(display);
         glutMouseFunc(mouse);
@@ -60,11 +60,9 @@
     static void mouse(int button, int state, int x, int y);
     static void movement(int x, int y);
     static void entry(int state);
- static std::map<int, window::impl *> s_windows;
+ std::map<int, window::impl *> m_windows;
 };
 
-std::map<int, window::impl *> glut::s_windows;
-
 
 class window::impl
 {
@@ -122,9 +120,9 @@
     }
     int id() const
     { return m_id; }
+ static glut *s_glut;
 private:
     int m_id;
- static glut *s_glut;
     window *m_window;
     std::string m_label;
 };
@@ -149,26 +147,26 @@
 void glut::display()
 {
     int id = glutGetWindow();
- s_windows[id]->display();
+ window::impl::s_glut->m_windows[id]->display();
     glutSwapBuffers();
 }
 
 void glut::mouse(int button, int state, int x, int y)
 {
     int id = glutGetWindow();
- s_windows[id]->mouse(button, state, x, y);
+ window::impl::s_glut->m_windows[id]->mouse(button, state, x, y);
 }
 
 void glut::movement(int x, int y)
 {
     int id = glutGetWindow();
- s_windows[id]->movement(x, y);
+ window::impl::s_glut->m_windows[id]->movement(x, y);
 }
 
 void glut::entry(int state)
 {
     int id = glutGetWindow();
- s_windows[id]->entry_exit(state);
+ window::impl::s_glut->m_windows[id]->entry_exit(state);
 }
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk