Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actuallomateron

Posted 19 November 2012 - 11:15 AM

I thought my mistake was in those lines, i i still think it is, here is the whole code.
[source lang="java"]LoMeFi(const char* name,int v,ID3D10Buffer** vl){ FILE * pFile; //---- pFile = fopen ( name , "rb" );//---- D3D10_BUFFER_DESC bds;//--- bds.Usage = D3D10_USAGE_DEFAULT;//---- bds.ByteWidth = 20*v;//---- bds.BindFlags = D3D10_BIND_VERTEX_BUFFER;//---- bds.CPUAccessFlags = 0;//---- bds.MiscFlags = 0;//---- vector<SimpleTex> ofg(v);//---- fread (&ofg[0],bds.ByteWidth,1,pFile);//---- D3D10_SUBRESOURCE_DATA iD; iD.pSysMem = &ofg[0]; iD.SysMemPitch=bds.ByteWidth; hr = g_pd3dDevice->CreateBuffer( &bds, &iD, vl); if( FAILED( hr ) ) return hr;}ID3D10Buffer* buffer;LoMeFi("gleass.bin",600,&buffer);[/source]

when i start drawing using the buffer it says

D3D10 INFO: ID3D10Device::DrawIndexed: Element [0] in the current Input Layout's declaration references input slot 0, but there is no Buffer bound to this slot. This is OK, as reads from an empty slot are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind an input Buffer here.  [ EXECUTION INFO #348: DEVICE_DRAW_VERTEX_BUFFER_NOT_SET]

#2lomateron

Posted 19 November 2012 - 11:13 AM

I thought my mistake was in those lines, i i still think it is, here is the hole code.
[source lang="java"]LoMeFi(const char* name,int v,ID3D10Buffer** vl){ FILE * pFile; //---- pFile = fopen ( name , "rb" );//---- D3D10_BUFFER_DESC bds;//--- bds.Usage = D3D10_USAGE_DEFAULT;//---- bds.ByteWidth = 20*v;//---- bds.BindFlags = D3D10_BIND_VERTEX_BUFFER;//---- bds.CPUAccessFlags = 0;//---- bds.MiscFlags = 0;//---- vector<SimpleTex> ofg(v);//---- fread (&ofg[0],bds.ByteWidth,1,pFile);//---- D3D10_SUBRESOURCE_DATA iD; iD.pSysMem = &ofg[0]; iD.SysMemPitch=bds.ByteWidth; hr = g_pd3dDevice->CreateBuffer( &bds, &iD, vl); if( FAILED( hr ) ) return hr;}ID3D10Buffer* buffer;LoMeFi("gleass.bin",600,&buffer);[/source]

when i start drawing using the buffer it says

D3D10 INFO: ID3D10Device::DrawIndexed: Element [0] in the current Input Layout's declaration references input slot 0, but there is no Buffer bound to this slot. This is OK, as reads from an empty slot are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind an input Buffer here.  [ EXECUTION INFO #348: DEVICE_DRAW_VERTEX_BUFFER_NOT_SET]

#1lomateron

Posted 19 November 2012 - 11:13 AM

I thought my mistake was in those lines, i i still think it is, here is the hole code.
[source lang="java"]LoMeFi(const char* name,int v,ID3D10Buffer** vl){ FILE * pFile; //---- pFile = fopen ( name , "rb" );//---- D3D10_BUFFER_DESC bds;//---    bds.Usage = D3D10_USAGE_DEFAULT;//----    bds.ByteWidth = 20*v;//----    bds.BindFlags = D3D10_BIND_VERTEX_BUFFER;//---- bds.CPUAccessFlags = 0;//---- bds.MiscFlags = 0;//---- vector<SimpleTex> ofg(v);//---- fread (&ofg[0],bds.ByteWidth,1,pFile);//---- D3D10_SUBRESOURCE_DATA iD;    iD.pSysMem = &ofg[0]; iD.SysMemPitch=bds.ByteWidth;    hr = g_pd3dDevice->CreateBuffer( &bds, &iD, vl);    if( FAILED( hr ) )        return hr;}ID3D10Buffer* buffer;LoMeFi("gleass.bin",600,&Buffer);[/source]

when i start drawing using the buffer it says

D3D10 INFO: ID3D10Device::DrawIndexed: Element [0] in the current Input Layout's declaration references input slot 0, but there is no Buffer bound to this slot. This is OK, as reads from an empty slot are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind an input Buffer here.  [ EXECUTION INFO #348: DEVICE_DRAW_VERTEX_BUFFER_NOT_SET]

PARTNERS