Comments (3)
This issue was traced to the fact that ModelMeshPart
uses GraphicsMemory
for the VB/IB. This effectively means it uses "DYNAMIC" (GPU/CPU shared memory) rather than "STATIC" (GPU only accessible memory like VRAM) memory allocation. This works fine for PrimitiveBatch
, SpriteBatch
, Constant Buffers, etc. and simplifies the interface for GeometricPrimitive
.
Given that most use of Model
is for static rather than dynamic geometry, this issue should be fixed by making ModelMeshPart
use ID3D12Resource pointers for VB and IB instead. This will require breaking changes to the existing Model loading API since it will now require a device instance as well as a ResourceUploadBatch
to complete the transfer to GPU memory. This will also impact anyone doing their own custom loaders or drawing with the DirectX 12 version of Model
.
from directxtk12.
Another option is to create a parallel StaticModel
, StaticModelMesh
, and StaticModelPart
. Then there can be either an Optimize
method on the Model
class which converts to a StaticModel
, or you can have direct loading of` StaticModel
.
from directxtk12.
See this pull request.
You can optionally call model->LoadBuffers(device, uploadBatch);
to convert a model from a dynamic VB/IB to a static VB/IB for better performance.
from directxtk12.
Related Issues (20)
- Disable Edit and Continue for Debug configs of library HOT 2
- Wiki Page - The Basic Game Loop - Link 404 ref HOT 2
- How do I return an allocation to DescriptorPile? HOT 3
- Retire VS 2017 support HOT 1
- DirectXTK emits a -Wreserved-identifier warning with clang v13
- Are d3d12sdklayers.dll symbols files available somewhere? HOT 1
- PostProcess Problem with Radeons 570 & 580 HOT 3
- VertexPositionNormal::InputLayout is undefined in the library HOT 1
- PBREffect directional lights still impact metalness when they are supposed to be off HOT 3
- GenerateMips is causing TDR HOT 6
- New game available written using DirectXTK12 HOT 1
- Make namespace configurable (avoid conflict with D3D11 DirectXTK) HOT 4
- Xbox One "Line drawing and anti aliasing" Tutorial Requires IID_GRAPHICS_PPV_ARGS HOT 2
- WICTextureLoader and DDSTextureLoader feature request HOT 3
- GenerateMips on sRGB Textures averaging in gamma space? HOT 3
- Retire legacy Xbox One XDK support
- "Basic Game Loop" from supplied Win32 template results in invalid window regions after window resize HOT 6
- Havok Animation System HOT 1
- MSAAHelper file downloads download wrong version HOT 1
- Nuget package is not compiled with security protections HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directxtk12.