Changeset 109 for trunk/src/lib/gl.cc


Ignore:
Timestamp:
06/06/13 17:29:27 (12 years ago)
Author:
epyon
Message:
  • prevent multiple loadings of the same library
File:
1 edited

Legend:

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

    r21 r109  
    203203#               define NV_GL_LOAD_EXT( symbol ) *(void **) (&symbol) = SDL_GL_GetProcAddress(#symbol);
    204204#else
    205         static nv::library gl_library( path );
     205        static nv::library gl_library;
     206        if ( gl_library.is_open() ) return true;
     207        gl_library.open( path );
     208
    206209        void * (NV_GL_APIENTRY *ext_loader) (const char* proc) = nullptr;
    207210#       if NV_PLATFORM == NV_WINDOWS
Note: See TracChangeset for help on using the changeset viewer.