Changeset 492 for trunk/nv/interface/device.hh
- Timestamp:
- 05/05/16 19:37:28 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/interface/device.hh
r491 r492 52 52 TEXTURE_2D_ARRAY, 53 53 TEXTURE_1D_BUFFER, 54 TEXTURE_2D_MULTISAMPLE, 54 55 }; 55 56 … … 79 80 TEXTURE_14 = 14, 80 81 TEXTURE_15 = 15, 82 MAX_TEXTURES = 16, 81 83 }; 82 84 … … 233 235 234 236 template < typename T > 235 voidset_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 ) 236 238 { 237 239 uniform_base* base = get_uniform( p, name, fatal ); … … 243 245 NV_ASSERT( static_cast<int>( count ) <= base->get_length(), "LENGTH CHECK FAIL" ); 244 246 static_cast< uniform<T>* >( base )->set_value( value, count ); 247 return true; 245 248 } 246 249 } 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 ) 264 268 { 265 269 uniform_base* base = get_uniform( p, name, fatal ); … … 269 273 { 270 274 static_cast< uniform<T>* >( base )->set_value( value ); 275 return true; 271 276 } 272 277 } 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 ); 279 285 } 280 286
Note: See TracChangeset
for help on using the changeset viewer.