Ignore:
Timestamp:
05/05/16 19:37:28 (9 years ago)
Author:
epyon
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/interface/device.hh

    r491 r492  
    5252                TEXTURE_2D_ARRAY,
    5353                TEXTURE_1D_BUFFER,
     54                TEXTURE_2D_MULTISAMPLE,
    5455        };
    5556
     
    7980                TEXTURE_14    = 14,
    8081                TEXTURE_15    = 15,
     82                MAX_TEXTURES  = 16,
    8183        };
    8284
     
    233235
    234236                template < typename T >
    235                 void set_uniform_array( program p, const string_view& name, const T* value, uint32 count, bool fatal = true )
     237                bool set_uniform_array( program p, const string_view& name, const T* value, uint32 count, bool fatal = true )
    236238                {
    237239                        uniform_base* base = get_uniform( p, name, fatal );
     
    243245                                        NV_ASSERT( static_cast<int>( count ) <= base->get_length(), "LENGTH CHECK FAIL" );
    244246                                        static_cast< uniform<T>* >( base )->set_value( value, count );
     247                                        return true;
    245248                                }
    246249                        }
    247                 }
    248 
    249                 template < typename T >
    250                 void set_opt_uniform_array( program p, const string_view& name, const T* value, uint32 count )
    251                 {
    252                         set_uniform_array( p, name, value, count, false );
    253                 }
    254 
    255                 template < typename T >
    256                 void set_opt_uniform_array( program p, const string_view& name, const array_view<T>& value )
    257                 {
    258                         set_uniform_array( p, name, value.data(), value.size(), false );
    259                 }
    260 
    261 
    262                 template < typename T >
    263                 void set_uniform( program p, const string_view& name, const T& value, bool fatal = true )
     250                        return false;
     251                }
     252
     253                template < typename T >
     254                bool set_opt_uniform_array( program p, const string_view& name, const T* value, uint32 count )
     255                {
     256                        return set_uniform_array( p, name, value, count, false );
     257                }
     258
     259                template < typename T >
     260                bool set_opt_uniform_array( program p, const string_view& name, const array_view<T>& value )
     261                {
     262                        return set_uniform_array( p, name, value.data(), value.size(), false );
     263                }
     264
     265
     266                template < typename T >
     267                bool set_uniform( program p, const string_view& name, const T& value, bool fatal = true )
    264268                {
    265269                        uniform_base* base = get_uniform( p, name, fatal );
     
    269273                                {
    270274                                        static_cast< uniform<T>* >( base )->set_value( value );
     275                                        return true;
    271276                                }
    272277                        }
    273                 }
    274 
    275                 template < typename T >
    276                 void set_opt_uniform( program p, const string_view& name, const T& value )
    277                 {
    278                         set_uniform( p, name, value, false );
     278                        return false;
     279                }
     280
     281                template < typename T >
     282                bool set_opt_uniform( program p, const string_view& name, const T& value )
     283                {
     284                        return set_uniform( p, name, value, false );
    279285                }
    280286
Note: See TracChangeset for help on using the changeset viewer.