Exemple #1
0
 /// <summary>
 /// Render propeller in legacy opengl.
 /// </summary>
 private DepthGroundNode(GroundModel model, string positionNameInIBufferable, params RenderMethodBuilder[] builders)
     : base(model, positionNameInIBufferable, builders)
 {
     this.ModelSize = model.ModelSize;
     this.Color     = new vec4(1, 1, 1, 1);
 }
Exemple #2
0
        public override void SetUniform(ShaderProgram program)
        {
            vec4 value = this.value;

            program.SetUniform(VarName, value.x, value.y, value.z, value.w);
        }
Exemple #3
0
 /// <summary>
 /// Render propeller in legacy opengl.
 /// </summary>
 private CubeNode(CubeModel model, string positionNameInIBufferable, params RenderUnitBuilder[] builders)
     : base(model, positionNameInIBufferable, builders)
 {
     this.ModelSize = model.ModelSize;
     this.Color     = new vec4(1, 1, 1, 1);
 }
Exemple #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="v"></param>
 public vec2(vec4 v)
 {
     this.x = v.x;
     this.y = v.y;
 }
        /// <summary>
        /// Move vertexes' position accroding to difference on screen.
        /// <para>根据<paramref name="differenceOnScreen"/>来修改指定索引处的顶点位置。</para>
        /// </summary>
        /// <param name="differenceOnScreen"></param>
        /// <param name="viewMatrix"></param>
        /// <param name="projectionMatrix"></param>
        /// <param name="viewport"></param>
        /// <param name="positionIndexes"></param>
        public override void MovePositions(Point differenceOnScreen, mat4 viewMatrix, mat4 projectionMatrix, vec4 viewport, IEnumerable <uint> positionIndexes)
        {
            base.MovePositions(differenceOnScreen, viewMatrix, projectionMatrix, viewport, positionIndexes);

            this.needsUpdating = true;
        }