public static void FrontFace(FrontFaceDirection mode) { Debug.Assert(Delegates.pglFrontFace != null, "pglFrontFace not implemented"); Delegates.pglFrontFace((Int32)mode); CallLog("glFrontFace({0})", mode); DebugCheckErrors(); }
/// <summary> Render setup for primitive Patches from a previous RS, with optional control over various parameters of the primitive </summary> static public GLRenderState Patches(GLRenderState prev, int patchsize = 4, FrontFaceDirection frontface = FrontFaceDirection.Ccw, bool cullface = true, PolygonMode polygonmode = PolygonMode.Fill) { return(new GLRenderState(prev) { PatchSize = patchsize, FrontFace = frontface, CullFace = cullface, PolygonModeFrontAndBack = polygonmode }); }
public static void FrontFace(FrontFaceDirection mode) { #if USE_OPENGL OpenTK.Graphics.OpenGL.GL.FrontFace((OpenTK.Graphics.OpenGL.FrontFaceDirection)mode); #else OpenTK.Graphics.ES11.GL.FrontFace((OpenTK.Graphics.ES11.All)mode); #endif }
/// <summary> Render setup for primitive Triangles with primitive restart, with optional control over various parameters of the primitive </summary> static public GLRenderState Tri(DrawElementsType primitiverestarttype, FrontFaceDirection frontface = FrontFaceDirection.Ccw, bool cullface = true, PolygonMode polygonmode = PolygonMode.Fill, bool polysmooth = false) { return(new GLRenderState() { PrimitiveRestart = GL4Statics.DrawElementsRestartValue(primitiverestarttype), FrontFace = frontface, CullFace = cullface, PolygonModeFrontAndBack = polygonmode, PolygonSmooth = polysmooth }); }
/// <summary> Render setup for primitive Triangles from a previous RS and with primitive restart, with optional control over various parameters of the primitive </summary> static public GLRenderState Tri(GLRenderState prev, uint primitiverestart, FrontFaceDirection frontface = FrontFaceDirection.Ccw, bool cullface = true, PolygonMode polygonmode = PolygonMode.Fill, bool polysmooth = false) { return(new GLRenderState(prev) { PrimitiveRestart = primitiverestart, FrontFace = frontface, CullFace = cullface, PolygonModeFrontAndBack = polygonmode, PolygonSmooth = polysmooth }); }
/// <summary> Render setup for primitive Quads from a previous RS, with optional control over various parameters of the primitive </summary> static public GLRenderState Quads(GLRenderState prev, FrontFaceDirection frontface = FrontFaceDirection.Ccw, bool cullface = true, PolygonMode polygonmode = PolygonMode.Fill, bool polysmooth = false) { return(new GLRenderState(prev) { FrontFace = frontface, CullFace = cullface, PolygonModeFrontAndBack = polygonmode, PolygonSmooth = polysmooth }); }
public void SetFrontFaceDirection(FrontFaceDirection frontFaceDirection) { if (currentObject == null) { throw new InvalidOperationException("Called SetFrontFaceDirection while not inside an object."); } CheckStartOwnDisplayList(); GL.FrontFace(frontFaceDirection); }
public static void FrontFace(FrontFaceDirection mode) { #if USE_OPENGL if (HardwareAvailable) { OpenTK.Graphics.OpenGL.GL.FrontFace((OpenTK.Graphics.OpenGL.FrontFaceDirection)mode); } #else OpenTK.Graphics.ES11.GL.FrontFace((OpenTK.Graphics.ES11.All)mode); #endif }
private void SetFrontFace(FrontFaceDirection frontFace) { // Changing clip origin will also change the front face to compensate // for the flipped viewport, we flip it again here to compensate as // this effect is undesirable for us. if (_clipOrigin == ClipOrigin.UpperLeft) { frontFace = frontFace == FrontFaceDirection.Ccw ? FrontFaceDirection.Cw : FrontFaceDirection.Ccw; } GL.FrontFace(frontFace); }
public void UpdateMesh() { if (_isDisposed) { throw new ObjectDisposedException("OpenGLMeshRenderer"); } if (_mesh == null) { throw new NullReferenceException("Mesh"); } if (_mesh.Vertices == null) { throw new NullReferenceException("Mesh.Vertices"); } if (_vao != null) { _shouldUpdateMesh = true; } _boundSphere = _mesh.Bounds.Sphere; _primitiveType = _mesh.Type; _frontFace = _mesh.FrontFace; _polygonMode = _mesh.DrawStyle; if (_mesh.Indices == null) { _verticesCount = (uint)_mesh.Vertices.Length; _isIndexed = false; } else { _verticesCount = (uint)_mesh.Indices.Length; _isIndexed = true; switch (_mesh.Indices.DataType) { case VertexAttribPointerType.UnsignedShort: _indexType = DrawElementsType.UnsignedShort; break; case VertexAttribPointerType.UnsignedInt: _indexType = DrawElementsType.UnsignedInt; break; default: throw new NotSupportedException("Unknown index type: " + _mesh.Indices.DataType); } } }
public void SetCoordinateSystem(CoordinateSystem c) { this.coords = c; if (c == CoordinateSystem.RightHanded) { this.sceneTransform = Matrix4.Identity; this.frontFace = FrontFaceDirection.Ccw; } else { this.sceneTransform = Matrix4.CreateScale(1, 1, -1); this.frontFace = FrontFaceDirection.Cw; } }
/// <summary> /// Merge this state with another one. /// </summary> /// <param name="state"> /// A <see cref="IGraphicsState"/> having the same <see cref="StateIdentifier"/> of this state. /// </param> public override void Merge(IGraphicsState state) { if (state == null) { throw new ArgumentNullException("state"); } CullFaceState otherState = state as CullFaceState; if (otherState == null) { throw new ArgumentException("not a CullFaceState", "state"); } _FrontFaceMode = otherState._FrontFaceMode; _Enabled = otherState._Enabled; _CulledFace = otherState._CulledFace; }
public static void FaceCulling(bool enable = true, CullFaceMode cullFaceMode = CullFaceMode.Back, FrontFaceDirection frontFace = FrontFaceDirection.Ccw) { if (enable) { if (!_faceCullingEnabled) { GL.Enable(EnableCap.CullFace); } GL.CullFace(cullFaceMode); GL.FrontFace(frontFace); _faceCullingMode = cullFaceMode; _faceCullingFrontFaceDirection = frontFace; } else if (_faceCullingEnabled) { GL.Disable(EnableCap.CullFace); } _faceCullingEnabled = enable; }
public void SetFrontFace(FrontFace frontFace) { SetFrontFace(_frontFace = frontFace.Convert()); }
internal static extern void glFrontFace(FrontFaceDirection mode);
public override void Reset() { Enabled = true; CullFaceMode = CullFaceMode.Back; FrontFaceDirection = FrontFaceDirection.Ccw; }
public void SetFrontFaceDirection(FrontFaceDirection frontFaceDirection) { this.frontFaceDirection = frontFaceDirection; }
public void FrontFace(FrontFaceDirection mode) => this.CallMethod <object>(FRONT_FACE, mode);
/// <summary> /// Construct a CullFaceState, specifying front face and disabling culling. /// </summary> /// <param name="frontFace"> /// A <see cref="FrontFace"/> that determine how front faces are determined. /// </param> public CullFaceState(FrontFaceDirection frontFace) { _FrontFaceMode = frontFace; _Enabled = false; }
public void FrontFace(FrontFaceDirection mode) { glFrontFace((int)mode); }
public static Reaction <T> Culling <T> (this Reaction <T> render, CullFaceMode mode = CullFaceMode.Back, FrontFaceDirection frontFace = FrontFaceDirection.Cw) { return(render.Culling(i => Tuple.Create(mode, frontFace))); }
public Culling() { enabled = true; cullMode = CullFaceMode.Back; frontFaceDir = FrontFaceDirection.Ccw; }
public static void qglFrontFace(FrontFaceDirection mode) => glFrontFace(mode);
public static void FrontFace(FrontFaceDirection winding) { CheckCurrent(); _bindings.glFrontFace((int)winding); CheckError(); }
public static void FrontFace(FrontFaceDirection dir) { Delegates.FrontFace(dir); }
/// <summary> /// Construct a CullFaceState, specifying front face and enabling culling of the specified faces. /// </summary> /// <param name="frontFace"> /// A <see cref="FrontFaceDirection"/> that specify how front faces are determined. /// </param> /// <param name="culledFace"> /// A <see cref="CullFaceMode"/> that specify which faces are culled. /// </param> public CullFaceState(FrontFaceDirection frontFace, CullFaceMode culledFace) { _FrontFaceMode = frontFace; _Enabled = true; _CulledFace = culledFace; }
public void FrontFace(FrontFaceDirection mode) { NativeMethods.FrontFace(mode); CheckForError(); }
public static extern void FrontFace( FrontFaceDirection mode );
public static void glFrontFace(FrontFaceDirection mode) { i_OpenGL1_0.glFrontFace(mode); }
/// <summary> /// Merge this state with another one. /// </summary> /// <param name="state"> /// A <see cref="IGraphicsState"/> having the same <see cref="StateIdentifier"/> of this state. /// </param> public override void Merge(IGraphicsState state) { if (state == null) throw new ArgumentNullException("state"); CullFaceState otherState = state as CullFaceState; if (otherState == null) throw new ArgumentException("not a CullFaceState", "state"); _FrontFaceMode = otherState._FrontFaceMode; _Enabled = otherState._Enabled; _CulledFace = otherState._CulledFace; }
public static void FrontFace(FrontFaceDirection mode) { gl.glFrontFace((int)mode); }
public static void FrontFace(FrontFaceDirection mode) { Instance?.FrontFace(mode); CheckForError(); }
public static void FrontFace(FrontFaceDirection mode) { #if USE_OPENGL if (openGlHardwareAvailable) { OpenTK.Graphics.OpenGL.GL.FrontFace((OpenTK.Graphics.OpenGL.FrontFaceDirection)mode); } #else OpenTK.Graphics.ES11.GL.FrontFace((OpenTK.Graphics.ES11.All)mode); #endif }
public void FrontFace(FrontFaceDirection mode) { gl.glFrontFace((int)mode); CheckException(); }
public static void FrontFace(FrontFaceDirection mode) { Instance?.FrontFace(mode); }
public static void FrontFace(FrontFaceDirection mode) { glFrontFace deleg = BaseGraphicsContext.Current.Loader.Get<glFrontFace>(); if (deleg != null) deleg(mode); }