Changeset 98
- Timestamp:
- 06/03/13 16:06:51 (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/gl/gl_window.hh
r93 r98 22 22 { 23 23 public: 24 gl_window( uint16 width, uint16 height );24 gl_window( device* dev, uint16 width, uint16 height ); 25 25 uint16 get_width() const; 26 26 uint16 get_height() const; … … 30 30 virtual bool poll_event( io_event& event ); 31 31 virtual context* get_context() { return m_context; } 32 virtual device* get_device() { return m_device; }; 33 32 34 virtual void swap_buffers(); 33 35 virtual ~gl_window(); 34 36 private: 37 device* m_device; 35 38 uint16 m_width; 36 39 uint16 m_height; -
trunk/nv/interface/window.hh
r93 r98 20 20 { 21 21 class context; 22 class device; 22 23 class window 23 24 { … … 31 32 virtual bool poll_event( io_event& event ) = 0; 32 33 virtual void swap_buffers() = 0; 34 virtual device* get_device() = 0; 33 35 virtual ~window() = 0 {}; 34 36 }; -
trunk/src/gl/gl_device.cc
r92 r98 17 17 window* gl_device::create_window( uint16 width, uint16 height ) 18 18 { 19 return new gl_window( width, height );19 return new gl_window( this, width, height ); 20 20 } 21 21 -
trunk/src/gl/gl_window.cc
r93 r98 148 148 149 149 150 gl_window::gl_window( uint16 width, uint16 height )151 : m_ width( width ), m_height( height ), m_title("NV Engine"), m_screen( nullptr )150 gl_window::gl_window( device* dev, uint16 width, uint16 height ) 151 : m_device( dev ), m_width( width ), m_height( height ), m_title("NV Engine"), m_screen( nullptr ) 152 152 { 153 153 int flags = SDL_OPENGL;
Note: See TracChangeset
for help on using the changeset viewer.