Jump to content
  • Advertisement
Sign in to follow this  
PhunBringer

Problem with disapearing vertices...

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

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??

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Then surely you're initialising at least one of them incorrectly. Show us your code and we'll surely find the error.

Regards
Admiral

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!