Add CreationError::NoAvailablePixelFormat

This commit is contained in:
Pierre Krieger 2015-07-20 19:42:32 +02:00
parent 43dabf131a
commit 57a1d546e7
3 changed files with 6 additions and 3 deletions

View file

@ -111,6 +111,7 @@ pub enum CreationError {
NotSupported,
RobustnessNotSupported,
OpenGlVersionNotSupported,
NoAvailablePixelFormat,
}
impl CreationError {
@ -122,6 +123,8 @@ impl CreationError {
not supported.",
CreationError::OpenGlVersionNotSupported => "The requested OpenGL version is not \
supported.",
CreationError::NoAvailablePixelFormat => "Couldn't find any pixel format that matches \
the criterias.",
}
}
}
@ -471,7 +474,7 @@ impl<'a> BuilderAttribs<'a> {
}
current_result.or(current_software_result)
.ok_or(CreationError::NotSupported)
.ok_or(CreationError::NoAvailablePixelFormat)
}
}