Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


function that creates index or vertex buffer problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 17 November 2012 - 11:11 PM

i have something like this:

[source lang="java"]void createBuferfunction(...some other parameters...,DWORD array[]){ ...some other code... D3D10_SUBRESOURCE_DATA iD; iD.pSysMem = array; //here is the problem hr = g_pd3dDevice->CreateBuffer( &bd, &iD, &Buffer);}[/source]

but as you can see that doesnt work because the array will be read as having only 1 element.
Is there any other easy way to do this?

Sponsor:

#2 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 17 November 2012 - 11:38 PM

o i solved it i just had to add this line

iD.SysMemPitch=sizeof( DWORD )*numElementsofArray;




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS