示例#1
0
        private static OrthoColorIndicatorNumber CreateNumber(ColorTemplate colorTemplate)
        {
            OrthoColorIndicatorNumber number = new OrthoColorIndicatorNumber()
            {
                Name = "color indicator's number"
            };

            number.colorTemplate = colorTemplate;

            return(number);
        }
示例#2
0
        public static unsafe OrthoColorIndicatorElement Create(ColorTemplate colorTemplate)
        {
            OrthoColorIndicatorElement element = new OrthoColorIndicatorElement()
            {
                Name = "orthogonal color indicator element"
            };

            OrthoColorIndicatorBar bar = CreateBar(colorTemplate);

            element.AddChild(bar);
            element.bar = bar;

            OrthoColorIndicatorNumber number = CreateNumber(colorTemplate);

            element.AddChild(number);
            element.number = number;

            //  Create a set of scene attributes.
            OpenGLAttributesEffect sceneAttributes = new OpenGLAttributesEffect()
            {
                Name = "Scene Attributes"
            };

            //  Specify the scene attributes.
            sceneAttributes.EnableAttributes.EnableDepthTest = true;
            sceneAttributes.EnableAttributes.EnableNormalize = true;
            sceneAttributes.EnableAttributes.EnableLighting  = false;
            //sceneAttributes.EnableAttributes.EnableTexture2D = true;
            //sceneAttributes.EnableAttributes.EnableBlend = true;
            //sceneAttributes.ColorBufferAttributes.BlendingSourceFactor = BlendingSourceFactor.SourceAlpha;
            //sceneAttributes.ColorBufferAttributes.BlendingDestinationFactor = BlendingDestinationFactor.OneMinusSourceAlpha;
            //sceneAttributes.LightingAttributes.TwoSided = true;
            //sceneAttributes.TransformAttributes.MatrixMode = MatrixMode.Projection;
            element.AddEffect(sceneAttributes);

            return(element);
        }