LinkedIn Reddit icon

Jingnan Si's Blog

Programming, Graphics Rendering and Life

Draw thick lines in opengl core profile

Modern opengl (core profile), the line width is limited by system. In order to draw a free width line smooth, we draw multiple triangles to construct a thick line. pyopengl implmentation is at github: https://github.com/stonewell/code-snippets/tree/master/opengl%5Fthick%5Fline

Draw anti-alias circle at give point with specified radius using OpenGL Core profile

In modern opengl (core profile), there are a lot of tutorials on how to draw a circle using fragment shader, but most of lack of source code and only show how to draw at (0,0). This code piece draw circle at given center point with specified radius. pyopengl implementation is at github: https://github.com/stonewell/code-snippets/tree/master/opengl%5Fcircle

Text Redering with OpenGL

Rendering 2d text with opengl, either using bitmap font or freetype library