Problem with disapearing vertices...
Hi Folkz!
Its been a while since ive last coded some DX stuff, so i decided to see if there is anything left what i knew ...
I tried some basic stuff, and now i have a strange problem which i cant explain to me, so i need to ask for ya help.
This is the problem:
Ive made a vertexbuffer, an indexbuffer, a rendred some triangles.
this is like i fill my vertexbuffer:
int pos=0;
for(int i=0;i<Vertices_High;i++)
for(int j=0;j<Vertices_Width;j++)
{
Vertices[pos].x = (-1)+i*0.05f;
Vertices[pos].z = 0.0f;
Vertices[pos].y =(-1)+j*0.05f;
Vertices[pos].Diffuse = 0x4500ff00;
pos++;
}
Everything worked well, until i wantet to put in some hight.
If i set the z value to everything higher than 0.000000001, the vertice isnt visible!
I really dont know why or what to do.
I think its cut out for some for or near plane stuff but
i dont have set any projection matrix or viewmatrix, there should be standard values for them.
If i set any view or projectionmatrix, my mesh dissapears complete.
Anyone any idea??
You need to init the World, View, and Projection matrices before using them. Leaving them at their default values will, I think, result in undefined behaviour.
Hope this helps.
Hope this helps.
nope sry. I tried both. if i init them, i cant see anything at all, leaving them by defaults, i can see my mesh, but cant do z > 0.0000001.
Then surely you're initialising at least one of them incorrectly. Show us your code and we'll surely find the error.
Regards
Admiral
Regards
Admiral
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement