Ignore:
Timestamp:
07/31/14 02:32:59 (11 years ago)
Author:
epyon
Message:
  • gl_context - support for integration with wxWindows
  • wx.hh - simple wxWindows integration
  • mesh_creator - flip normals and merge operations added
  • fix in packed_indexed_array
  • various minor fixes
File:
1 edited

Legend:

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

    r246 r295  
    206206
    207207gl_window::gl_window( device* dev, uint16 width, uint16 height, bool fullscreen )
    208         : m_device( dev ), m_width( width ), m_height( height ), m_title("NV Engine"), m_handle( nullptr ), m_adopted( false )
     208        : m_device( dev ), m_width( width ), m_height( height ), m_title("NV Engine"), m_handle( nullptr ), m_hwnd( 0 ), m_adopted( false )
    209209{
    210210        //      bpp = m_info->vfmt->BitsPerPixel;
     
    298298void gl_window::swap_buffers()
    299299{
    300         if ( m_adopted ) return; // NOT SURE
     300        if ( m_adopted )
     301        {
     302#if NV_PLATFORM == NV_WINDOWS
     303                ::SwapBuffers( (HDC)m_hwnd );
     304#else
     305        NV_ASSERT( false, "Native GL context only working with SDL 2.0!" );
     306#endif
     307
     308        }
    301309#if NV_SDL_VERSION == NV_SDL_20
    302310        SDL_GL_SwapWindow( static_cast<SDL_Window*>( m_handle ) );
     
    328336//      m_height  = (uint16)rect.bottom;
    329337        m_handle  = window;
     338        m_hwnd    = ::GetDC( (HWND)handle );
    330339        m_context->set_viewport( nv::ivec4( 0, 0, m_width, m_height ) );
    331340#else
Note: See TracChangeset for help on using the changeset viewer.