Sign in to follow this  

Flickering triangle

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this