• Advertisement
Sign in to follow this  

DX10 problem with ID3D10Buffer::Map

This topic is 3479 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i´ve created a ID3D10Buffer which will store all the object´s vertices with... D3D10_BUFFER_DESC vertex_buffer_desc; vertex_buffer_desc.Usage = D3D10_USAGE_DYNAMIC; vertex_buffer_desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; vertex_buffer_desc.BindFlags = D3D10_BIND_VERTEX_BUFFER; vertex_buffer_desc.MiscFlags = 0; vertex_buffer_desc.ByteWidth = ...; i want the buffer to be updated from the cpu sometimes, so i set the appropiate flags. The buffer is created ok, cause i can render the object and it looks as it should, and the createbuffer function returns ok. my problem is that whenever i try to access this buffer from the cpu i get this float *data = NULL; HRESULT hr = dx10_vertex_data_buffer->Map(D3D10_MAP_WRITE, 0, (void **) &data); if (FAILED(hr)) return false; this gives me an EINVALIDARG in the hresult and of course it fails what am i missing??? any ideas????

Share this post


Link to post
Share on other sites
Advertisement
Pass the debug flag to your device on device creation, and you will get extremely verbose error messages in your output window that tell you what you're doing wrong.

Share this post


Link to post
Share on other sites
thanks

now i have a nice message showing me what i did wrong

really useful info ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement