Page 1 of 1
Point Light
Posted: September 5th, 2020, 2:05 pm
by aslanbey0158
At the attached file ,went somethings wrong.
I think the problem deals with transformcbuf.cpp
Re: Point Light
Posted: September 6th, 2020, 9:36 am
by albinopapa
One problem is
std::unique_ptr<VertexConstantBuffer<TransformCbuf>> pVcbuf;
should be
std::unique_ptr<VertexConstantBuffer<TransformCbuf::Transforms>> TransformCbuf::pVcbuf;
in TransformCbuf.cpp
another problem that I can't test because I don't have the files ( I get an ERROR_FILE_NOT_FOUND error when trying to run your app ), but your Transforms struct is
Code: Select all
struct Transforms
{
DirectX::XMMATRIX modelViewProj;
DirectX::XMMATRIX model;
};
expects modelViewProj then model transform
but you have
Code: Select all
const auto model = parent.GetTransformXM();
const Transforms tf =
{
DirectX::XMMatrixTranspose( model ),
DirectX::XMMatrixTranspose( model *
gfx.GetCamera()*
gfx.GetProjection()
)
};
model then modelViewProj being created in the reverse order.
Re: Point Light
Posted: September 6th, 2020, 9:37 am
by albinopapa
There were a few other errors like not including <iterator> in App.cpp for std::back_inserter
Re: Point Light
Posted: September 6th, 2020, 1:34 pm
by aslanbey0158
There were 2 problem and i solved them.