aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-07-20 19:42:32 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-07-20 19:42:32 +0200
commit57a1d546e7ea80731a20f0771676f66f0cf595f9 (patch)
tree71fab1fec33319589fe322779e0dc027dc864d9c /src/lib.rs
parent43dabf131aa9f76610e1cfd0685e3b36de8c2ebd (diff)
downloadglutin-57a1d546e7ea80731a20f0771676f66f0cf595f9.tar.gz
glutin-57a1d546e7ea80731a20f0771676f66f0cf595f9.zip
Add CreationError::NoAvailablePixelFormat
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b543702..9b45ae9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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)
}
}