public virtual int FindVertexBuffer(
            ref Guid resourceId,
            out ID2D1VertexBuffer buffer
            )
        {
            var fp = GetFunctionPointer(18);

            if (m_FindVertexBufferFunc == null)
            {
                m_FindVertexBufferFunc = (FindVertexBufferFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FindVertexBufferFunc));
            }
            buffer = new ID2D1VertexBuffer();
            return(m_FindVertexBufferFunc(m_ptr, ref resourceId, out buffer.PtrForNew));
        }
        public virtual int CreateVertexBuffer(
            ref D2D1_VERTEX_BUFFER_PROPERTIES vertexBufferProperties,
            ref Guid resourceId,
            ref D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES customVertexBufferProperties,
            out ID2D1VertexBuffer buffer
            )
        {
            var fp = GetFunctionPointer(17);

            if (m_CreateVertexBufferFunc == null)
            {
                m_CreateVertexBufferFunc = (CreateVertexBufferFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateVertexBufferFunc));
            }
            buffer = new ID2D1VertexBuffer();
            return(m_CreateVertexBufferFunc(m_ptr, ref vertexBufferProperties, ref resourceId, ref customVertexBufferProperties, out buffer.PtrForNew));
        }
Beispiel #3
0
        public virtual int SetVertexProcessing(
            ID2D1VertexBuffer vertexBuffer,
            D2D1_VERTEX_OPTIONS vertexOptions,
            ref D2D1_BLEND_DESCRIPTION blendDescription,
            ref D2D1_VERTEX_RANGE vertexRange,
            ref Guid vertexShader
            )
        {
            var fp = GetFunctionPointer(11);

            if (m_SetVertexProcessingFunc == null)
            {
                m_SetVertexProcessingFunc = (SetVertexProcessingFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(SetVertexProcessingFunc));
            }

            return(m_SetVertexProcessingFunc(m_ptr, vertexBuffer != null ? vertexBuffer.Ptr : IntPtr.Zero, vertexOptions, ref blendDescription, ref vertexRange, ref vertexShader));
        }