Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the shader name to link errors. #1214

Merged
merged 1 commit into from May 9, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -449,10 +449,10 @@ impl Program {
self.gl.link_program(self.id);
if self.gl.get_program_iv(self.id, gl::LINK_STATUS) == (0 as gl::GLint) {
let error_log = self.gl.get_program_info_log(self.id);
println!("Failed to link shader program: {}", error_log);
println!("Failed to link shader program: {:?}\n{}", self.name, error_log);
self.gl.detach_shader(self.id, vs_id);
self.gl.detach_shader(self.id, fs_id);
return Err(ShaderError::Link(error_log));
return Err(ShaderError::Link(self.name.clone(), error_log));
}

Ok(())
@@ -860,7 +860,7 @@ pub struct Capabilities {
#[derive(Clone, Debug)]
pub enum ShaderError {
Compilation(String, String), // name, error mssage

This comment has been minimized.

@kvark

kvark May 9, 2017

Member

should really use the named fields here instead of the comments

Link(String), // error message
Link(String, String), // name, error message
}

pub struct Device {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.