From c32cb95835f274af741492cb2958f88f8d84828d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 2 Jan 2015 15:49:07 -0500 Subject: [PATCH] lib/glesv2: add some doc to `GLError` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/glesv2/glesv2.nit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/glesv2/glesv2.nit b/lib/glesv2/glesv2.nit index 814ec68..54a9fcd 100644 --- a/lib/glesv2/glesv2.nit +++ b/lib/glesv2/glesv2.nit @@ -328,8 +328,13 @@ end # An OpenGL ES 2.0 error code extern class GLError super GLEnum + + # Is there no error? fun is_ok: Bool do return is_no_error + + # Is this not an error? fun is_no_error: Bool `{ return recv == GL_NO_ERROR; `} + fun is_invalid_enum: Bool `{ return recv == GL_INVALID_ENUM; `} fun is_invalid_value: Bool `{ return recv == GL_INVALID_VALUE; `} fun is_invalid_operation: Bool `{ return recv == GL_INVALID_OPERATION; `} -- 1.7.9.5