Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

function that creates index or vertex buffer problem

4: Adsense

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   

491
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?

#2 lomateron   Members   

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