Jump to content
  • Advertisement
Sign in to follow this  

Flickering triangle

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

Looks like a far clip issue. What are you setting near and far clip planes to, and z-buffer accuracy?
Also, what sort of geometry is your background constructed from? The above presumes there's some sort of skybox/dome.

Share this post

Link to post
Share on other sites
It could be that you specify a small vertex scope when you draw your triangles.

I don't know OpenGl, but in D3D the problem could be in

INT BaseVertexIndex,
UINT MinIndex,
->UINT NumVertices,
UINT StartIndex,
UINT PrimitiveCount

Have your tried switching between debug/release on your application?

Share this post

Link to post
Share on other sites
60, // Field of view = 60 degrees
static_cast<double>(WinYSize), // Window aspect (assumes square pixels)
0, // Near Z clipping plane
1000 // Far Z clippling plane


Did I forget something?

There's no difference between Debug/Release
This doesn't happen with the Direct3D implementation of my Engine

Edit: Hm - Just checked my Mesh exporting plugin - it didn't export normals properly. Though I don't see any connnection to a flickering triangle...

[Edited by - AzraelilMeraz on October 10, 2008 3:37:12 PM]

Share this post

Link to post
Share on other sites
Eek! That near clip essentially asks your z-buffer to be accurate over an infinite amount of possibilities (up to 1km at least).
For best results use a near clip of 1.0, and if you want to get the camera right up close then 0.1 is fair (together with your 1000.0 far clip).

edit: so correcting your exported normals have solved this? I guess you are culling back faces and the normal was pointing sideways to the camera (making front face visibility borderline).

Share this post

Link to post
Share on other sites
Yep, I also set the near clipping plane to 1.0 because of another mesh which didn't render properly. Thank you for your help and for explaining why 1.0 for near plane is better. :)

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!