ygSunshine's picture

Quads draws as tessellated triangles with wireframe?

Hi all,

I am trying some simple OpenGL rendering using OpenTK. When I draw a rectangle:

 
GL.Begin(BeginMode.Quads);
GL.Color3(0.85, 0.85, 0.95);
GL.Vertex3(-bgSize, -bgSize, -bgSize);
GL.Vertex3(bgSize, -bgSize, -bgSize);
GL.Color3(0.1, 0.1, 0.9);
GL.Vertex3(bgSize, bgSize, -bgSize);
GL.Vertex3(-bgSize, bgSize, -bgSize);
GL.End();

It renders with the borders of the two tessellated triangles. That means, it renders the polygon + the tessellated wireframe! This looks like a nice free gift to have, but what I want is just a plan polygon..

Did I miss out something? What are the things I should check?

Thanks in advance.

Inline Images
Quads with tessellated triangle wireframes

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

This doesn't look quite right. Check your initialization code:

  • Are you changing the polygon mode (GL.PolygonMode) to something other than fill?
  • Are you using front-face culling?
ygSunshine's picture

Hi,

I tried to use/not use things like
GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill);
But always the same.

The problem occurs on my Vista machine with NVIDIA Quadro FX1700, but same code works fine on my XP laptop with ATi Mobility FireGL V5250. So I guess it is somehow related with the graphics card/driver..

Any one has any idea?