Ignore:
Timestamp:
07/21/15 19:40:00 (10 years ago)
Author:
epyon
Message:
  • string.hh split into separate files
  • string.hh - removed std::string conversions (header still stays though)
File:
1 edited

Legend:

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

    r406 r433  
    1919        m_shader_header  = "#version 120\n";
    2020        for ( auto& i : get_uniform_factory() )
    21                 m_shader_header += "uniform "+datatype_to_glsl_type( i.second->get_datatype() )+" "+ i.first.to_string() +";\n";
     21                m_shader_header += "uniform "+datatype_to_glsl_type( i.second->get_datatype() )+" "+ std::string( i.first.data(), i.first.size() ) +";\n";
    2222        for ( auto& i : get_link_uniform_factory() )
    23                 m_shader_header += "uniform sampler2D "+i.first.to_string() +";\n";
     23                m_shader_header += "uniform sampler2D "+std::string( i.first.data(), i.first.size() ) +";\n";
    2424}
    2525
     
    212212                for ( auto& i : *info->m_uniform_map )
    213213                {
    214                         auto j = lmap.find( i.first );
     214                        auto j = lmap.find( i.first.c_str() );
    215215                        if ( j != lmap.end() )
    216216                        {
     
    218218                        }                       
    219219
    220                         auto k = map.find( i.first );
     220                        auto k = map.find( i.first.c_str() );
    221221                        if ( k != map.end() )
    222222                        {
     
    238238                if ( fatal )
    239239                {
    240                         NV_LOG_CRITICAL( "gl_device : uniform '", string_view( name ), "' not found in program!" );
     240                        NV_LOG_CRITICAL( "gl_device : uniform '", string_view( name.c_str(), name.size() ), "' not found in program!" );
    241241                        NV_ABORT( "gl_device : uniform not found!" );
    242242                }
     
    257257                if ( fatal )
    258258                {
    259                         NV_LOG_CRITICAL( "gl_device : attribute '", string_view( name ), "' not found in program!" );
     259                        NV_LOG_CRITICAL( "gl_device : attribute '", string_view( name.c_str(), name.size() ), "' not found in program!" );
    260260                        NV_ABORT( "gl_device : attribute not found!" );
    261261                }
Note: See TracChangeset for help on using the changeset viewer.