Jump to content
  • Advertisement
Sign in to follow this  

Distorted 3D Primitives

This topic is 3090 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 guys. I am trying to render a 3d grid for the player to walk on in my scene however every time I render the grid, regardless of the type of primitive I try to draw, I seem to be getting distorted lines. Here is an example of what my grid looks like. http://www.brandonfogerty.com/my_stuff/images/3DGrid.png I am using hardware vertex processing and I have tried using a vertex buffer to draw the grid. I have tried using lines, triangle lists, and triangle strips to render the grid but I continue to get the same distortion. It seems that I see this distortion on my machine however on other computers, the distortion is not nearly as noticeable. Do you guys have any hints as to what might be causing this? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
That looks like your client area size isn't the same as your backbuffer size. When you create your window, do you use AdjustWindowRect to get the correct size? The sizes passed to CreateWindow are the sizes of the window (Including title bar, menu, borders, etc), not of the renderable area.

Share this post


Link to post
Share on other sites
Steve, thanks alot. That was indeed the problem. After using the AdjustWindowRect method you suggested, the lines appear to be rendered correctly. Thanks again!

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!