예제 #1
0
        public virtual int GetConstantBuffer(
            out ID3D10Buffer ppConstantBuffer
            )
        {
            var fp = GetFunctionPointer(26);

            if (m_GetConstantBufferFunc == null)
            {
                m_GetConstantBufferFunc = (GetConstantBufferFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetConstantBufferFunc));
            }
            ppConstantBuffer = new ID3D10Buffer();
            return(m_GetConstantBufferFunc(m_ptr, out ppConstantBuffer.PtrForNew));
        }
예제 #2
0
        public virtual int SetConstantBuffer(
            ID3D10Buffer pConstantBuffer
            )
        {
            var fp = GetFunctionPointer(25);

            if (m_SetConstantBufferFunc == null)
            {
                m_SetConstantBufferFunc = (SetConstantBufferFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(SetConstantBufferFunc));
            }

            return(m_SetConstantBufferFunc(m_ptr, pConstantBuffer != null ? pConstantBuffer.Ptr : IntPtr.Zero));
        }