Changeset 440 for trunk/src/lib/gl.cc
- Timestamp:
- 07/23/15 21:16:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gl.cc
r406 r440 56 56 57 57 58 static void* load_gl_ext_symbol_impl( const char*name, nv::log_level fail_level = nv::LOG_DEBUG )59 { 60 void* result = gl_ext_loader( name );58 static void* load_gl_ext_symbol_impl( const nv::string_view& name, nv::log_level fail_level = nv::LOG_DEBUG ) 59 { 60 void* result = gl_ext_loader( name.data() ); 61 61 NV_LOG( ( result ? nv::LOG_DEBUG : fail_level ), "load_gl_ext_symbol : ", name, ( result ? " succeded." : "failed." ) ); 62 62 return result; 63 63 } 64 64 65 static void* load_gl_ext_symbol( const char* name, bool iterate, const char*ext )65 static void* load_gl_ext_symbol( const nv::string_view& name, bool iterate, const nv::string_view& ext ) 66 66 { 67 67 void * result = nullptr; 68 result = load_gl_ext_symbol_impl( ext ? ( std::string(name) + ext ).c_str() : name ); 68 nv::string128 test_name = name + ext; 69 result = load_gl_ext_symbol_impl( !ext.empty() ? test_name : name ); 69 70 if ( result ) return result; 70 71 if ( iterate ) 71 72 { 72 result = gl_ext_loader( (std::string(name) + "ARB").c_str() ); 73 test_name = name + "ARB"_ls; 74 result = gl_ext_loader( test_name.data() ); 73 75 if ( result ) return result; 74 result = gl_ext_loader( (std::string(name) + "EXT").c_str() ); 76 test_name = name + "EXT"_ls; 77 result = gl_ext_loader( test_name.data() ); 75 78 if ( result ) return result; 76 79 } … … 255 258 256 259 # define NV_GL_FUN_EXT( rtype, symbol, fparams ) \ 257 void_assign( symbol, load_gl_ext_symbol(#symbol, true, nullptr) ); \260 void_assign( symbol, load_gl_ext_symbol(#symbol, true, string_view()) ); \ 258 261 count++; if ( !symbol ) fail_count++; 259 262
Note: See TracChangeset
for help on using the changeset viewer.