Another error message
-
- Posts: 52
- Joined: April 15th, 2017, 10:48 am
Another error message
i get another error
- Attachments
-
- uyg 24-2 _2.rar
- (847.34 KiB) Downloaded 202 times
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Another error message
Still getting error message about not including <string> in DxgiInfoManager.h
Still getting error message about not including <iterator> in App.cpp
And probably the thing you're asking about:
The TransformCBuf constructor is missing a parameter in the make_unique line. Look at the constructors for ConstantBuffer, you should be able to figure out what's missing.
Also, it turns out you aren't setting the slot value in a PointLight PixelConstantBuffer, it's always a good idea to initialize your variables.
Still getting error message about not including <iterator> in App.cpp
And probably the thing you're asking about:
Code: Select all
TransformCbuf::TransformCbuf( Graphics& gfx, const Drawable& parent, UINT slot )
:
parent( parent )
{
if( !pVcbuf )
{
pVcbuf = std::make_unique<VertexConstantBuffer<Transforms>>( gfx, slot );
}
}
Also, it turns out you aren't setting the slot value in a PointLight PixelConstantBuffer, it's always a good idea to initialize your variables.
Code: Select all
template<typename C>
class ConstantBuffer : public Bindable
{
public:
void Update( Graphics& gfx,const C& consts )
ConstantBuffer( Graphics& gfx, const C& consts, UINT slot =0 )
ConstantBuffer( Graphics& gfx )
protected:
Microsoft::WRL::ComPtr<ID3D11Buffer> pConstantBuffer;
UINT slot; // <--- RIGHT HERE SHOULD BE: UINT slot = 0u;
};
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: Another error message
I did everything but the problem is continue.
I believe the problem too small but i cant resolve.
I believe the problem too small but i cant resolve.
- Attachments
-
- uyg 24-2 _2_2.rar
- (846.92 KiB) Downloaded 203 times
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Another error message
You haven't fixed everything I mentioned:
You haven't changed anything here.
I told you to look at the ConstantBuffer constructors
You have two constructors for ConstantBuffer. The first one takes a Graphics& reference, a C const& and a UINT. You are trying to create a VertexConstantBuffer using a Graphics& and a UINT. The UINT slot is defaulted, so the compiler is trying to create a VertexConstantBuffer using a Graphics& and a UINT instead of a Graphics& and a C const&. It's trying to use the UINT slot as a C const& and it's not liking it because you are trying to create a VertexConstantBuffer<TransformCbuf::Transforms> and not a VertexConstantBuffer<UINT>.
Code: Select all
TransformCbuf::TransformCbuf( Graphics& gfx, const Drawable& parent, UINT slot )
:
parent( parent )
{
if( !pVcbuf )
{
pVcbuf = std::make_unique<VertexConstantBuffer<Transforms>>( gfx, slot );
}
}
I told you to look at the ConstantBuffer constructors
Code: Select all
ConstantBuffer( Graphics& gfx, const C& consts, UINT slot = 0);
ConstantBuffer( Graphics& gfx );
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: Another error message
I solved the problem of ConstantBuffer . By this way The program runned.
TransformCbuf may be different but it runs.
Thanks for every helps
TransformCbuf may be different but it runs.
Thanks for every helps