private void SetupAttributeBindings(AttributeBindings attributeBindings) { if ( RenderStack.Graphics.Configuration.mustUseVertexArrayObject || ( RenderStack.Graphics.Configuration.canUseVertexArrayObject && RenderStack.Graphics.Configuration.useVertexArrayObject ) ) { attributeBindings.Use(); if (attributeBindings.Dirty) { attributeBindings.VertexBufferRange.Buffer.Use(); attributeBindings.IndexBufferRange.Buffer.Use(); attributeBindings.SetupAttributePointers(); attributeBindings.Dirty = false; } } else { attributeBindings.VertexBufferRange.Buffer.Use(); attributeBindings.IndexBufferRange.Buffer.Use(); attributeBindings.SetupAttributePointers(); } }
public State(State old) { Camera = old.Camera; Viewport = old.Viewport; Model = old.Model; Frame = old.Frame; Mesh = old.Mesh; Material = old.Material; Program = old.Program; MeshMode = old.MeshMode; VertexBuffer = old.VertexBuffer; IndexBuffer = old.IndexBuffer; AttributeBindings = old.AttributeBindings; }
private void DisableAttributeBindings(AttributeBindings attributeBindings) { if ( RenderStack.Graphics.Configuration.mustUseVertexArrayObject || ( RenderStack.Graphics.Configuration.canUseVertexArrayObject && RenderStack.Graphics.Configuration.useVertexArrayObject ) ) { // NOP } else { attributeBindings.DisableAttributes(); } }