Example #1
0
        /// <summary>
        /// 描画オブジェクトを追加します。
        /// </summary>
        public void AddRender(GLUtil.Texture texture, BlendType blend,
                              RectangleF bounds, Matrix44d transform,
                              Mesh mesh, double zorder,
                              double opacity = 1.0)
        {
            if (texture == null || texture.TextureName == 0)
            {
                return;
            }

            var alphaByte = (byte)Math.Min(256 * opacity, 255);
            var color = Color.FromArgb(alphaByte, Color.White);
            var transform2 = ToMatrix(bounds, transform);

            AddRender(texture, blend, color, mesh, transform2, zorder);
        }
Example #2
0
        /// <summary>
        /// 描画オブジェクトを追加します。
        /// </summary>
        public void AddRender(BlendType blend, Color color, Mesh mesh,
                              Matrix44d transform, double zorder)
        {
            if (mesh == null)
            {
                throw new ArgumentNullException("mesh");
            }

            AddRenderInternal(new RenderData
            {
                Blend = blend,
                Color = color,
                Mesh = mesh,
                Transform = transform,
                ZOrder = zorder,
            });
        }