Index buffer error in software mode

Started by
0 comments, last by Namethatnobodyelsetook 18 years, 8 months ago
Here's a bit of a funny problem. I am creating a device, first in hardware if it will allow it, in software if it won't. I then check the device caps, and if need be, switch to a software device from the original hardware device. However, when I switch to use software mode, I am getting the following error: "Direct3D9: (ERROR) :Invalid index in the index stream: 127" I have checked all of the the device caps and am only copying about 9000 indices and about 4000 vertices into their respective buffers. I've also tried manually switching the buffers to use software modes, which should happen automatically with a software created device anyways, but to no avail. Also, I have attempted to change the location where Direct3D stores the vertices (VRAM or system RAM) and again, to no avail. Thank in advance for any help or opinions.
Advertisement
It's saying an index of 127 isn't valid. (Or maybe the 127th index, whatever is in the buffer, isn't valid.) This often comes from your arguments to DrawIndexedPrimitive. You probably have either MinIndex > 127 or (MinIndex + NumVertices) < 127. In other words, you've promised not to need vertex 127, but your index buffer refers to it. nVidia hardware will ignore this, ATI hardware, software mode, and REF will all complain about doing such things.

This topic is closed to new replies.

Advertisement