From 75d3409627b0aaf6f533a9cc095be7466feceadf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 2 Jan 2015 15:50:40 -0500 Subject: [PATCH] lib/glesv2: intro depth_range, depth_mask, polygon_offset & line_width MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/glesv2/glesv2.nit | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/glesv2/glesv2.nit b/lib/glesv2/glesv2.nit index 54a9fcd..3e6ad1b 100644 --- a/lib/glesv2/glesv2.nit +++ b/lib/glesv2/glesv2.nit @@ -425,6 +425,11 @@ class GLES # Set the viewport fun viewport(x, y, width, height: Int) `{ glViewport(x, y, width, height); `} + # Specify mapping of depth values from normalized device coordinates to window coordinates + # + # Default at `gl_depth_range(0.0, 1.0)` + fun depth_range(near, far: Float) `{ glDepthRangef(near, far); `} + # Define front- and back-facing polygons # # Front-facing polygons are clockwise if `value`, counter-clockwise otherwise. @@ -478,6 +483,15 @@ class GLES # Should always return `true` in OpenGL ES 2.0 and 3.0. fun shader_compiler: Bool do return get_bool(0x8DFA) + # Enable or disable writing into the depth buffer + fun depth_mask(value: Bool) `{ glDepthMask(value); `} + + # Set the scale and units used to calculate depth values + fun polygon_offset(factor, units: Float) `{ glPolygonOffset(factor, units); `} + + # Specify the width of rasterized lines + fun line_width(width: Float) `{ glLineWidth(width); `} + # Set the texture minifying function # # Foreign: glTexParameter with GL_TEXTURE_MIN_FILTER -- 1.7.9.5