Beispiel #1
0
        private T ReadUniform <T>(byte[] memory, int offset, int size) where T : struct
        {
            T ret = new T();

            MemoryCopyHelper.ReadStructure(memory, offset, ref ret);
            return(ret);
        }
Beispiel #2
0
        private T ReadUniform <T>(int binding, int set) where T : struct
        {
            var layout     = m_context.m_CommandBuffer.m_context.m_DescriptorSets[set].m_Bindings[binding];
            var bufferInfo = m_context.m_CommandBuffer.m_context.m_DescriptorSets[set].m_BufferInfo[binding];

            SoftwareBuffer       softwareBuffer = (SoftwareBuffer)bufferInfo.buffer;
            SoftwareDeviceMemory mem            = softwareBuffer.m_deviceMemory;
            int startIndex = bufferInfo.offset + softwareBuffer.m_memoryOffset;
            T   ret        = new T();

            MemoryCopyHelper.ReadStructure(mem.m_bytes, startIndex, ref ret);
            return(ret);
        }
Beispiel #3
0
 private T ReadVertexBuffer <T>(byte[] memory, int offset, int stride) where T : struct
 {
     return(MemoryCopyHelper.ReadStructure <T>(memory, (stride * this.gl_VertexIndex) + offset));
 }