From: Alexis Laferrière Date: Fri, 2 Jan 2015 20:49:07 +0000 (-0500) Subject: lib/glesv2: add some doc to `GLError` X-Git-Tag: v0.7.1~55^2~5 X-Git-Url: http://nitlanguage.org lib/glesv2: add some doc to `GLError` Signed-off-by: Alexis Laferrière --- 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; `}