0

When reading the specification of glPolygonMode(), I have the feeling that it is just an alternative way to fill a polygon with the desired color.

Am I right?

Because if yes, what is the benefit of using this command to fill a polygon, rather than just using glVertex() commands which fills the polygon by doing the interpolation between the specified polygon vertices?

I am using OpenGL SC 1.0.1.

genpfault
  • 51,148
  • 11
  • 85
  • 139
LudoDu31
  • 31
  • 4
  • 1
    No. [`glPolygonMode`](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPolygonMode.xhtml) sets a mode, it controls the interpretation of polygons for rasterization. The default `glPolygonMode` is `GL_FILL`. Alternatively it can be set to `GL_LINE` or `GL_POINT`. – – Rabbid76 Aug 19 '20 at 17:34
  • ok, what do you mean by "interpolation of polygons for rasterization" ? Which properties of the polygon are interpolated ? – LudoDu31 Aug 19 '20 at 17:48
  • Please read [`glPolygonMode`](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPolygonMode.xhtml) – Rabbid76 Aug 19 '20 at 18:15
  • well, I read that but I am very confused. I am not sure to understand rasterization... Do we have like a default rasterization mode in OpenGL SC 1.0.1 ? – LudoDu31 Aug 19 '20 at 18:28
  • "Interpretation", not "interpolation". If the mode isn't `GL_FILL`, polygons don't get filled at all, they just have the edges or vertices drawn. – jasonharper Aug 19 '20 at 19:17
  • Is there another way to control interpretation of polygons rather than using glPolygonMode ? – LudoDu31 Aug 20 '20 at 00:06

0 Answers0