rust/lib-hedgewars-engine/src/render/gl.rs
changeset 15762 84c07aa94b61
parent 15761 e7eb0cd5b0e4
child 15764 b10bbfb2b354
equal deleted inserted replaced
15761:e7eb0cd5b0e4 15762:84c07aa94b61
   415 
   415 
   416                 gl::DeleteProgram(program);
   416                 gl::DeleteProgram(program);
   417                 return Err(String::from_utf8_unchecked(log));
   417                 return Err(String::from_utf8_unchecked(log));
   418             }
   418             }
   419 
   419 
   420             //gl::DetachShader(program, vs);
       
   421             if let Some(ps) = ps {
       
   422                 //gl::DetachShader(program, ps);
       
   423             }
       
   424 
       
   425             gl::UseProgram(program);
   420             gl::UseProgram(program);
   426 
   421 
   427             // after linking we setup sampler bindings as specified in the shader
       
   428             for bind in bindings {
   422             for bind in bindings {
   429                 match bind {
   423                 match bind {
   430                     VariableBinding::Uniform(name, id) => {
   424                     VariableBinding::Uniform(name, id) => {
   431                         let c_str = CString::new(name.as_bytes()).unwrap();
   425                         let c_str = CString::new(name.as_bytes()).unwrap();
   432                         let index = gl::GetUniformLocation(
   426                         let index = gl::GetUniformLocation(