예제 #1
0
        private void ApplyPrimitiveRestart(PrimitiveRestart primitiveRestart)
        {
            if (_renderState.PrimitiveRestart.Enabled != primitiveRestart.Enabled)
            {
                Enable(EnableCap.PrimitiveRestart, primitiveRestart.Enabled);
                _renderState.PrimitiveRestart.Enabled = primitiveRestart.Enabled;
            }

            if (primitiveRestart.Enabled)
            {
                if (_renderState.PrimitiveRestart.Index != primitiveRestart.Index)
                {
                    GL.PrimitiveRestartIndex(primitiveRestart.Index);
                    _renderState.PrimitiveRestart.Index = primitiveRestart.Index;
                }
            }
        }