Ignore:
Timestamp:
07/12/16 20:22:23 (9 years ago)
Author:
epyon
Message:
  • several STL updates
  • several minor fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_window.cc

    r466 r505  
    99#include "nv/core/logging.hh"
    1010#include "nv/lib/gl.hh"
     11#include "nv/lib/sdl.hh"
    1112
    1213using namespace nv;
     
    3132        delete m_context;
    3233        m_context = nullptr;
    33         delete m_input;
    3434}
    3535
     
    4141
    4242        m_handle = handle;
     43        m_dc     = dc;
    4344
    4445        // TODO: error checking
     
    110111}
    111112
     113void 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
     121nv::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.