protected void SetIndexBuffer <I>(IIndexParser <I> indexParser) where I : struct { numIndices = indexParser.IndexCount; indexStride = Marshal.SizeOf(typeof(I)); indexBufferSizeInBytes = numIndices * indexStride; indices = new DataStream(indexBufferSizeInBytes, true, true); for (int i = 0; i < numIndices; i++) { indexParser.FillIndex(i, out I index); indices.Write(index); } indices.Position = 0; indexBuffer = new Buffer( DeviceManager.Instance.device, indices, indexBufferSizeInBytes, ResourceUsage.Default, BindFlags.IndexBuffer, CpuAccessFlags.None, ResourceOptionFlags.None, 0); }
public OmeLoader(IDataStore dataStore, IOctreeParser octreeParser, ITriangleParser triangleParser, IIndexParser indexParser, IVertexParser vertexParser) { _headerLineCount = 11; _dataStore = dataStore; _octreeParser = octreeParser; _triangleParser = triangleParser; _indexParser = indexParser; _vertexParser = vertexParser; }
public SymbolIndex(IFileSystem fileSystem, PythonLanguageVersion version) { var comparer = PathEqualityComparer.Instance; _index = new ConcurrentDictionary <string, IMostRecentDocumentSymbols>(comparer); _indexParser = new IndexParser(fileSystem, version); _disposables .Add(_indexParser) .Add(() => { foreach (var recentSymbols in _index.Values) { recentSymbols.Dispose(); } }); }
public MostRecentDocumentSymbols(string path, IIndexParser indexParser) { _path = path; _indexParser = indexParser; }
public MostRecentDocumentSymbols(string path, IIndexParser indexParser, bool library) { _path = path; _indexParser = indexParser; _library = library; }