Changeset 343
- Timestamp:
- 10/09/14 18:05:29 (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/gl/gl_window.hh
r326 r343 31 31 virtual uint16 get_height() const { return m_height; } 32 32 virtual string get_title() const { return std::string(); } 33 // TODO : implement? 34 virtual void set_swap_control( bool ) {}; 35 33 36 virtual bool is_event_pending() { return m_input->is_event_pending(); } 34 37 virtual bool poll_event( io_event& event ) { return m_input->poll_event( event ); } -
trunk/nv/interface/window.hh
r326 r343 31 31 virtual context* get_context() = 0; 32 32 virtual bool is_event_pending() = 0; 33 // TODO: there should be a general options mechanism 34 virtual void set_swap_control( bool ) = 0; 33 35 virtual bool poll_event( io_event& event ) = 0; 34 36 virtual void swap_buffers() = 0; -
trunk/nv/sdl/sdl_window.hh
r326 r343 34 34 virtual uint16 get_height() const { return m_height; } 35 35 virtual string get_title() const { return m_title; } 36 virtual void set_swap_control( bool enabled ); 36 37 virtual bool is_event_pending() { return m_input->is_event_pending(); } 37 38 virtual bool poll_event( io_event& event ) { return m_input->poll_event( event ); } -
trunk/src/sdl/sdl_window.cc
r340 r343 65 65 NV_LOG( LOG_INFO, "OpenGL Version : " << glGetString(GL_VERSION) ); 66 66 NV_LOG( LOG_INFO, "OpenGL GLSL Version : " << glGetString(GL_SHADING_LANGUAGE_VERSION) ); 67 //SDL_GL_SetSwapInterval(0);67 SDL_GL_SetSwapInterval(1); 68 68 69 69 // TODO: do we really need this? … … 97 97 SDL_DestroyWindow( static_cast<SDL_Window*>( m_handle ) ); 98 98 } 99 100 void nv::sdl::window::set_swap_control( bool enabled ) 101 { 102 SDL_GL_SetSwapInterval( enabled ? 1 : 0 ); 103 }
Note: See TracChangeset
for help on using the changeset viewer.