Advertisement Jump to content
Sign in to follow this  

Direct3D9: (ERROR) :Stream 0 does not have required number of vertices

This topic is 4768 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

I am currently writing a puzzle game that involves fitting different shapes blocks into a box and am coming across problems with directX while trying to implement the graphics. For the box I simply want to draw eight lines, 4 lines joined to make a square which will represent the base of the box, and one line sticking up from each corner of the base. I had these lines appearing perfectly and stored a copy of this code in case I ended up messing it up at a later stage. My next task was to draw one of the pieces above the box(lines). I went about trying to do this and did something that caused nothing to be rendered on the screen (not the lines or the piece). Luckily I had made a copy of my previously working code and loaded this up again only to find out that nothing appeared on the screen when I ran the program even though I had changed no code from when it worked previously. I am getting the following D3D error when I run the program now Direct3D9: (ERROR) :DrawPrimitive failed. Direct3D9: (ERROR) :Stream 0 does not have required number of vertices I have looked this error up on google and found a few other postings on forums where a similar thing has happened with other people(code that used to work doesn't anymore). My piece is made up of 78 vertices/26 polygons. I have a simple application that can draw the piece on it's own with no problem as well as move and rotate it. Is this a hardware problem? Would reinstalling the graphics drivers help? If anyone can help me with this I will be eternally grateful. Thanks Neil

Share this post

Link to post
Share on other sites
I've only ever gotten that error if my code has the incorrect parameters to SetStreamSource() and/or DrawPrimitive() - effectively asking it to render more data than exists (a buffer overrun if you like).

I've not seen it myself, but I'd imagine you could also get this warning by having an incorrect declaration/FVF - causing D3D to incorrectly interpret the vertex data.

However, you're saying that the code worked before. After you broke your code you rolled back to EXACTLY the same working code (are you 110% sure of this?) and it no longer works?

Have you attempted to clean/rebuild your entire project to make sure there aren't any cached files/binaries around? No chances of any mis-matching files and so on?

I can't honestly see why the process you described would break the runtime, drivers or hardware. I'd put money on it being something else [oh]

If, after triple-checking, definitely have the same source code, I'd add in as many debug statements as you can to verify the quantities and state of the pipeline at the time the error occurs.


Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!