D3DUSAGE_WRITEONLY problem

Started by
11 comments, last by Chett2001 16 years, 11 months ago
Quote:Original post by Citizen Erased
Ok, I did
 HRESULT hr = vbTree->Lock(0, 0, (void**)&v, 0); 
and hr = 0. I made sure the breakpoint was on the line after. Even tried the line after that and it's still 0. What does this mean? What's going on here?

If you use the DirectX Error Lookup tool that comes with the SDK and look up a value of 0, you'll see that 0 translates to S_OK, which means the call succeeded.

I notice you never actually specified which error it is you're getting. What kind of error, and when does it happen?
Sirob Yes.» - status: Work-O-Rama.
Advertisement
Another question: what's the value of 'i' where the program fails? If it's high, it might be that your buffer is too small, and you're writing outside it. If it's 0, then you have a problem with 'v' itself.
I know its basic but make sure your vertex buffer is big enough as others have said, maybe try making it a lot larger than needed just to see if thats the problem at least that way you can eliminate it if not.
Chett - "I look forward to helping all of you one day, but right now im just a noob learning his way through the perils of game Development."

This topic is closed to new replies.

Advertisement