At the attached file ,went somethings wrong.
I think the problem deals with transformcbuf.cpp
Point Light
-
- Posts: 52
- Joined: April 15th, 2017, 10:48 am
Point Light
- Attachments
-
- uyg 24-1.rar
- (855.36 KiB) Downloaded 189 times
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Point Light
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
expects modelViewProj then model transform
but you have
model then modelViewProj being created in the reverse order.
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;
};
but you have
Code: Select all
const auto model = parent.GetTransformXM();
const Transforms tf =
{
DirectX::XMMatrixTranspose( model ),
DirectX::XMMatrixTranspose( model *
gfx.GetCamera()*
gfx.GetProjection()
)
};
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Point Light
There were a few other errors like not including <iterator> in App.cpp for std::back_inserter
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 52
- Joined: April 15th, 2017, 10:48 am
Re: Point Light
There were 2 problem and i solved them.