Changeset 505 for trunk/src/gl/gl_window.cc
- Timestamp:
- 07/12/16 20:22:23 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_window.cc
r466 r505 9 9 #include "nv/core/logging.hh" 10 10 #include "nv/lib/gl.hh" 11 #include "nv/lib/sdl.hh" 11 12 12 13 using namespace nv; … … 31 32 delete m_context; 32 33 m_context = nullptr; 33 delete m_input;34 34 } 35 35 … … 41 41 42 42 m_handle = handle; 43 m_dc = dc; 43 44 44 45 // TODO: error checking … … 110 111 } 111 112 113 void nv::gl_window::make_current() 114 { 115 #if NV_PLATFORM == NV_WINDOWS 116 HDC hdc = reinterpret_cast<HDC>( m_hwnd ); 117 dynwglMakeCurrent( hdc, reinterpret_cast<HGLRC>( m_context->get_native_handle() ) ); 118 #endif 119 } 120 121 nv::uint32 nv::gl_window::window_id() 122 { 123 return SDL_GetWindowID( static_cast<SDL_Window*>( m_handle ) ); 124 } 125
Note: See TracChangeset
for help on using the changeset viewer.