Ejemplo n.º 1
0
 public CIndexBufferDesc(EIndexBufferType type = EIndexBufferType.IBT_Int16)
 {
     //CPUAccess = (UInt32)ECpuAccess.CAS_WRITE;
     CPUAccess = 0;
     Type      = type;
     ByteWidth = 0;
     InitData  = IntPtr.Zero;
 }
Ejemplo n.º 2
0
        public bool Init(UInt32 streams, EIndexBufferType ibType, int atom)
        {
            if (false == SDK_GfxMeshDataProvider_Init(CoreObject, streams, ibType, atom))
            {
                return(false);
            }

            var ptr = SDK_GfxMeshDataProvider_GetIndices(CoreObject);

            IndexBuffer = new Support.CBlobObject(ptr);

            for (int i = 0; i < (int)EVertexSteamType.VST_Number; i++)
            {
                ptr = SDK_GfxMeshDataProvider_GetStream(CoreObject, (EVertexSteamType)i);
                if (ptr.GetPointer() == IntPtr.Zero)
                {
                    continue;
                }
                VertexBuffers[i] = new Support.CBlobObject(ptr);
            }
            return(true);
        }
Ejemplo n.º 3
0
 public extern static vBOOL SDK_GfxMeshDataProvider_Init(NativePointer self, UInt32 streams, EIndexBufferType ibType, int atom);
Ejemplo n.º 4
0
 public extern static vBOOL SDK_GfxMeshPrimitives_SetGeomtryMeshIndex(NativePointer self, CRenderContext.NativePointer rc, IntPtr data, UInt32 size, EIndexBufferType type, UInt32 cpuAccess);
Ejemplo n.º 5
0
 public bool SetGeomtryMeshIndex(CRenderContext rc, IntPtr data, UInt32 size, EIndexBufferType type, UInt32 cpuAccess)
 {
     return((bool)SDK_GfxMeshPrimitives_SetGeomtryMeshIndex(CoreObject, rc.CoreObject, data, size, type, cpuAccess));
 }