Point Light

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
aslanbey0158
Posts: 52
Joined: April 15th, 2017, 10:48 am

Point Light

Post by aslanbey0158 » September 5th, 2020, 2:05 pm

At the attached file ,went somethings wrong.
I think the problem deals with transformcbuf.cpp
Attachments
uyg 24-1.rar
(855.36 KiB) Downloaded 186 times

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Point Light

Post by albinopapa » September 6th, 2020, 9:36 am

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.
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

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Point Light

Post by albinopapa » September 6th, 2020, 9:37 am

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

aslanbey0158
Posts: 52
Joined: April 15th, 2017, 10:48 am

Re: Point Light

Post by aslanbey0158 » September 6th, 2020, 1:34 pm

There were 2 problem and i solved them.

Post Reply