Advertisement

Passing Constant Buffer Data without Struct C++ DX11

Started by November 18, 2023 05:20 PM
1 comment, last by frob 1 year ago

I have a std::vector for constantbuffer.

Its contains data such as 4x4 matrices, floats, etc. for constant buffer, I don't want to do this in a static way (like creating XXXStruct), i wanna in a dynamic way, in fact I don't want the user to be able to send his own constant buffer datas.

How can I send this data dynamically without creating a special struct for that buffer?

or just pass std::vector.data() to constant buffer?

for dynamic data im storing vector to std::variant type

On computers today, all of main memory is equal. An array is an array is an array. The functions need a pointer to some data organized in a specific way. They don't care what you did to organize the data in the right way, all that matters is that it is formatted as expected.

This topic is closed to new replies.

Advertisement