Changeset 493 for trunk/src/gl/gl_context.cc
- Timestamp:
- 05/06/16 19:25:05 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_context.cc
r492 r493 317 317 glUseProgram( info->glid ); 318 318 gdevice->update_uniforms( info ); 319 } 320 } 319 if ( !info->validated ) 320 { 321 validate_program( p ); 322 } 323 } 324 } 325 326 bool nv::gl_context::validate_program( program p ) 327 { 328 gl_device* gdevice = static_cast<gl_device*>( m_device ); 329 gl_program_info* info = gdevice->m_programs.get( p ); 330 if ( info ) 331 { 332 info->validated = true; 333 const uint32 buffer_size = 1024; 334 char buffer[buffer_size] = { 0 }; 335 int length; 336 int status; 337 glValidateProgram( info->glid ); 338 glGetProgramiv( info->glid, GL_VALIDATE_STATUS, &status ); 339 340 if ( status == GL_FALSE ) 341 { 342 glGetProgramInfoLog( info->glid, buffer_size, &length, buffer ); 343 NV_LOG_ERROR( "Program #", info->glid, " validation error : ", buffer ); 344 return false; 345 } 346 return true; 347 } 348 return false; 349 } 350 321 351 322 352 // void nv::gl_context::bind( buffer b )
Note: See TracChangeset
for help on using the changeset viewer.