Archived

This topic is now archived and is closed to further replies.

DX8.1 geometry rendering problem....help badly needed.

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

Recommended Posts

Hi everyone, i''m stuck with a problem i seem to be unable to solve. I''m implementing a very basic heightmap->terrain class at the moment and i stopped working on it for a few weeks. now that i opened the project again i discover that it''s not rendering anymore. So i installed the DX8.1 Debug Version and when debugging i get the following debugmessage from DX8:
Direct3D8: (ERROR) :Stream 0 stride should match the stride, implied by the current vertex shader"
Now, i understand what that means, but the problems are: 1. I didnt change ANYthing in the code. 2. I don''t know what D3D expects as stride when i use
(D3DFVF_XYZ | D3DFVF_DIFFUSE)
as fvf vertex shader. 3. I used basically the same methods of rendering vertices as there are in the tutorials/Tut02_Vertices tutorial. I have the same vertex structure (ok, except the rhw value). But as i said, the same code was rendering fine before, and now it stopped. (The only difference between earlier and now is that i''m now using VisualStudio.NET instead of VC++6) My vertex struct looks like this:
struct CUSTOMVERTEX {
FLOAT x,y,z;
D3DXCOLOR	color;
};

Does anyone know how to find out, what D3D expects as stride? Any help is greatly appreciated.

Share on other sites
Try deleting the debug/release directories and do a full-rebuild.

Share on other sites
Did that too (of course), with no change.

Share on other sites
Do you set the correct vertex shader?
ie. you should be using the fixed function pipeline as shader via:
before trying to DIP any polys...

Maybe using DWORD instead of D3DXCOLOR fixes the problem...

Share on other sites
THANK YOU! Now it works again!
The problem was indeed the D3DXCOLOR instead of a simple DWORD!

Thanks a billion again!!

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 26
• 10
• 9
• 9
• 11
• Forum Statistics

• Total Topics
633694
• Total Posts
3013378
×