SFML.Graphics.RenderStates.Marshal C# (CSharp) 메소드

Marshal() 개인적인 메소드

private Marshal ( ) : MarshalData
리턴 MarshalData
        internal MarshalData Marshal()
        {
            MarshalData data = new MarshalData();
            data.blendMode = BlendMode;
            data.transform = Transform;
            data.texture = Texture != null ? Texture.CPointer : IntPtr.Zero;
            data.shader = Shader != null ? Shader.CPointer : IntPtr.Zero;

            return data;
        }

Usage Example

예제 #1
0
        ////////////////////////////////////////////////////////////
        /// <summary>
        /// Draw primitives defined by a sub-array of vertices
        /// </summary>
        /// <param name="vertices">Pointer to the vertices</param>
        /// <param name="start">Index of the first vertex to use in the array</param>
        /// <param name="count">Number of vertices to draw</param>
        /// <param name="type">Type of primitives to draw</param>
        /// <param name="states">Render states to use for drawing</param>
        ////////////////////////////////////////////////////////////
        public void Draw(Vertex[] vertices, uint start, uint count, PrimitiveType type, RenderStates states)
        {
            RenderStates.MarshalData marshaledStates = states.Marshal();

            unsafe
            {
                fixed(Vertex *vertexPtr = vertices)
                {
                    sfRenderWindow_drawPrimitives(CPointer, vertexPtr + start, count, type, ref marshaledStates);
                }
            }
        }
All Usage Examples Of SFML.Graphics.RenderStates::Marshal