Example #1
0
 public Vector3 GetPositionOrNormal(EVertexSteamType stream, UInt32 index)
 {
     unsafe
     {
         if (index >= VertexBuffers[(int)stream].Size / sizeof(Vector3))
         {
             throw new ArgumentOutOfRangeException();
         }
         var pPos = (Vector3 *)VertexBuffers[(int)stream].Data.ToPointer();
         return(pPos[index]);
     }
 }
Example #2
0
        public CVertexBuffer GetVertexBuffer(EVertexSteamType index)
        {
            var ptr = SDK_IVertexArray_GetVertexBuffer(CoreObject, index);

            if (ptr.GetPointer() == IntPtr.Zero)
            {
                return(null);
            }
            var vb = new CVertexBuffer(ptr);

            vb.Core_AddRef();
            return(vb);
        }
Example #3
0
 public extern static IntPtr SDK_GfxMeshDataProvider_GetVertexPtr(NativePointer self, EVertexSteamType stream, UInt32 index);
Example #4
0
 public extern static Support.CBlobObject.NativePointer SDK_GfxMeshDataProvider_GetStream(NativePointer self, EVertexSteamType index);
Example #5
0
 public IntPtr GetVertexPtr(EVertexSteamType stream, UInt32 index)
 {
     return(SDK_GfxMeshDataProvider_GetVertexPtr(CoreObject, stream, index));
 }
 public extern static vBOOL SDK_GfxMeshPrimitives_SetGeomtryMeshStream(NativePointer self, CRenderContext.NativePointer rc, EVertexSteamType stream, IntPtr data, UInt32 size, UInt32 stride, UInt32 cpuAccess);
 public bool SetGeomtryMeshStream(CRenderContext rc, EVertexSteamType stream, IntPtr data, UInt32 size, UInt32 stride, UInt32 cpuAccess)
 {
     return((bool)SDK_GfxMeshPrimitives_SetGeomtryMeshStream(CoreObject, rc.CoreObject, stream, data, size, stride, cpuAccess));
 }
Example #8
0
 public extern static CVertexBuffer.NativePointer SDK_IVertexArray_GetVertexBuffer(NativePointer self, EVertexSteamType index);
Example #9
0
 public extern static void SDK_IVertexArray_BindVertexBuffer(NativePointer self, EVertexSteamType index, CVertexBuffer.NativePointer vb);
Example #10
0
 public void BindVertexBuffer(EVertexSteamType index, CVertexBuffer vb)
 {
     SDK_IVertexArray_BindVertexBuffer(CoreObject, index, vb.CoreObject);
 }
Example #11
0
 public extern static CVertexBuffer.NativePointer SDK_IGeometryMesh_GetVertexBuffer(NativePointer self, EVertexSteamType index);
Example #12
0
 public extern static void SDK_IGeometryMesh_BindVertexBuffer(NativePointer self, EVertexSteamType index, CVertexBuffer.NativePointer vb);
Example #13
0
 public void BindVertexBuffer(EVertexSteamType index, CVertexBuffer vb)
 {
     SDK_IGeometryMesh_BindVertexBuffer(CoreObject, index, vb.CoreObject);
 }