Tag Info

New answers tagged


you have to update your subresource (if i'm not mistaken): md3dDeviceContext->UpdateSubresource(mMatrixBuffer, 0, NULL, &worldViewProjM, 0, 0);


Non-array struct members for constant buffers in HLSL are packed on four byte offsets, as many as it can into 16-byte vectors. If a member would straddle a vector boundary, it starts a new vector. You cannot achieve this with just an alignment and pack directive, you need to have explicit padding in your CPU-side structure to emulate the CB layout rules. ...


I believe your DEAOColor crosses the 16 byte alignment boundary. Your first bool is 4 bytes so DEAOColor get's cut in two. Try switching them (and any other variable that doesn't fit within the 16 byte steps).


Your implementation is a bit off of the other Entity-Component systems I've seen. I recommend taking a look at EntityX. It should give a good idea of what a working implementation looks like. You could also read these which may help: Role of systems in entity systems architecture Component - Game Programming Patterns Understanding ...

Top 50 recent answers are included