- Timestamp:
- 06/06/13 17:29:27 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/freetype2.cc
r21 r109 148 148 { 149 149 # define NV_FREETYPE_LOAD( symbol ) *(void **) (&symbol) = freetype_library.get(#symbol); 150 static nv::library freetype_library( path ); 150 static nv::library freetype_library; 151 if ( freetype_library.is_open() ) return true; 152 freetype_library.open( path ); 151 153 152 154 NV_FREETYPE_LOAD( FT_Init_FreeType ); -
trunk/src/lib/gl.cc
r21 r109 203 203 # define NV_GL_LOAD_EXT( symbol ) *(void **) (&symbol) = SDL_GL_GetProcAddress(#symbol); 204 204 #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 206 209 void * (NV_GL_APIENTRY *ext_loader) (const char* proc) = nullptr; 207 210 # if NV_PLATFORM == NV_WINDOWS -
trunk/src/lib/lua.cc
r5 r109 185 185 # define NV_LUA_LOAD( symbol ) *(void **) (&symbol) = lua_library.get(#symbol); 186 186 187 static nv::library lua_library( path ); 187 static nv::library lua_library; 188 if ( lua_library.is_open() ) return true; 189 lua_library.open( path ); 190 188 191 189 192 /* State manipulation */ -
trunk/src/lib/sdl12.cc
r5 r109 191 191 { 192 192 # define NV_SDL_LOAD( symbol ) *(void **) (&symbol) = sdl_library.get(#symbol); 193 static nv::library sdl_library( path ); 193 static nv::library sdl_library; 194 if ( sdl_library.is_open() ) return true; 195 sdl_library.open( path ); 194 196 195 197 /* SDL.h functions */ -
trunk/src/lib/sdl_image.cc
r5 r109 37 37 { 38 38 # define NV_SDL_IMAGE_LOAD( symbol ) *(void **) (&symbol) = sdl_image_library.get(#symbol); 39 static nv::library sdl_image_library( path ); 39 static nv::library sdl_image_library; 40 if ( sdl_image_library.is_open() ) return true; 41 sdl_image_library.open( path ); 40 42 41 43 NV_SDL_IMAGE_LOAD( IMG_Linked_Version ); -
trunk/src/library.cc
r64 r109 36 36 using namespace nv; 37 37 38 library::library( const std::string& name)39 : m_name( name)38 library::library() 39 : m_name(), m_handle( nullptr ) 40 40 { 41 m_handle = NULL;42 open();43 41 } 44 42 … … 90 88 } 91 89 92 90 bool library::is_open() const 91 { 92 return m_handle != nullptr; 93 } 93 94 94 95 void library::close()
Note: See TracChangeset
for help on using the changeset viewer.