git.s-ol.nu ~forks/DiligentTools / 1051884
Renamed USAGE_STATIC to USAGE_IMMUTABLE (API240077) assiduous 8 months ago
4 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
231231 std::string VBName = ss.str();
232232 BufferDesc VBDesc;
233233 VBDesc.Name = VBName.c_str();
234 VBDesc.Usage = USAGE_STATIC;
234 VBDesc.Usage = USAGE_IMMUTABLE;
235235 VBDesc.uiSizeInBytes = static_cast<Uint32>(VBArr.NumVertices * VBArr.StrideUint8s);
236236 VBDesc.BindFlags = BIND_VERTEX_BUFFER;
237237
253253
254254 BufferDesc IBDesc;
255255 IBDesc.Name = IBName.c_str();
256 IBDesc.Usage = USAGE_STATIC;
256 IBDesc.Usage = USAGE_IMMUTABLE;
257257 IBDesc.uiSizeInBytes = static_cast<Uint32>(IBArr.NumIndices * (IBArr.IndexType == IT_16BIT ? 2 : 4));
258258 IBDesc.BindFlags = BIND_INDEX_BUFFER;
259259
14141414 VBDesc.Name = "GLTF vertex attribs 0 buffer";
14151415 VBDesc.uiSizeInBytes = static_cast<Uint32>(VertexData0.size() * sizeof(VertexData0[0]));
14161416 VBDesc.BindFlags = BIND_VERTEX_BUFFER;
1417 VBDesc.Usage = USAGE_STATIC;
1417 VBDesc.Usage = USAGE_IMMUTABLE;
14181418
14191419 BufferData BuffData(VertexData0.data(), VBDesc.uiSizeInBytes);
14201420 pDevice->CreateBuffer(VBDesc, &BuffData, &pVertexBuffer[0]);
14261426 VBDesc.Name = "GLTF vertex attribs 1 buffer";
14271427 VBDesc.uiSizeInBytes = static_cast<Uint32>(VertexData1.size() * sizeof(VertexData1[0]));
14281428 VBDesc.BindFlags = BIND_VERTEX_BUFFER;
1429 VBDesc.Usage = USAGE_STATIC;
1429 VBDesc.Usage = USAGE_IMMUTABLE;
14301430
14311431 BufferData BuffData(VertexData1.data(), VBDesc.uiSizeInBytes);
14321432 pDevice->CreateBuffer(VBDesc, &BuffData, &pVertexBuffer[1]);
14391439 IBDesc.Name = "GLTF inde buffer";
14401440 IBDesc.uiSizeInBytes = static_cast<Uint32>(IndexBuffer.size() * sizeof(IndexBuffer[0]));
14411441 IBDesc.BindFlags = BIND_INDEX_BUFFER;
1442 IBDesc.Usage = USAGE_STATIC;
1442 IBDesc.Usage = USAGE_IMMUTABLE;
14431443
14441444 BufferData BuffData(IndexBuffer.data(), IBDesc.uiSizeInBytes);
14451445 pDevice->CreateBuffer(IBDesc, &BuffData, &pIndexBuffer);
380380 FontTexDesc.Height = static_cast<Uint32>(height);
381381 FontTexDesc.Format = TEX_FORMAT_RGBA8_UNORM;
382382 FontTexDesc.BindFlags = BIND_SHADER_RESOURCE;
383 FontTexDesc.Usage = USAGE_STATIC;
383 FontTexDesc.Usage = USAGE_IMMUTABLE;
384384
385385 TextureSubResData Mip0Data[] = {{pixels, FontTexDesc.Width * 4}};
386386 TextureData InitData(Mip0Data, _countof(Mip0Data));
4242 const Char* Name DEFAULT_VALUE(nullptr);
4343
4444 /// Usage
45 USAGE Usage DEFAULT_VALUE(USAGE_STATIC);
45 USAGE Usage DEFAULT_VALUE(USAGE_IMMUTABLE);
4646
4747 /// Bind flags
4848 BIND_FLAGS BindFlags DEFAULT_VALUE(BIND_SHADER_RESOURCE);