public void Set(PolygonModeMask enables, float factor, float units, float clamp) { _enables = enables; _factor = factor; _units = units; _clamp = clamp; }
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp) { if ((enables & PolygonModeMask.Point) != 0) { GL.Enable(EnableCap.PolygonOffsetPoint); } else { GL.Disable(EnableCap.PolygonOffsetPoint); } if ((enables & PolygonModeMask.Line) != 0) { GL.Enable(EnableCap.PolygonOffsetLine); } else { GL.Disable(EnableCap.PolygonOffsetLine); } if ((enables & PolygonModeMask.Fill) != 0) { GL.Enable(EnableCap.PolygonOffsetFill); } else { GL.Disable(EnableCap.PolygonOffsetFill); } if (enables == 0) { return; } if (HwCapabilities.SupportsPolygonOffsetClamp) { GL.PolygonOffsetClamp(factor, units, clamp); } else { GL.PolygonOffset(factor, units); } }
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp) { if ((enables & PolygonModeMask.Point) != 0) { GL.Enable(EnableCap.PolygonOffsetPoint); } else { GL.Disable(EnableCap.PolygonOffsetPoint); } if ((enables & PolygonModeMask.Line) != 0) { GL.Enable(EnableCap.PolygonOffsetLine); } else { GL.Disable(EnableCap.PolygonOffsetLine); } if ((enables & PolygonModeMask.Fill) != 0) { GL.Enable(EnableCap.PolygonOffsetFill); } else { GL.Disable(EnableCap.PolygonOffsetFill); } if (enables == 0) { return; } GL.PolygonOffset(factor, units); // TODO: Enable when GL_EXT_polygon_offset_clamp is supported. // GL.PolygonOffsetClamp(factor, units, clamp); }
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp) { _renderer.New <SetDepthBiasCommand>().Set(enables, factor, units, clamp); _renderer.QueueCommand(); }