Skip to content

Instantly share code, notes, and snippets.

View tksuoran's full-sized avatar

Timo Suoranta tksuoran

  • Helsinki, Finland
View GitHub Profile
Using FT_Glyph_Stroke()
Font::Font(path = "res/fonts/Ubuntu-R.ttf", size = 74, outline_thickness = 26.0)
Font::render()
Freetype version 2.10.1
glyph index = 4 code = '!': width = 15 height = 70 left = 7 top = 69 outline = 0.0
| .##########: |
| .##########: |
| .##########: |
| .##########: |
glCreateBuffers(n = 1, buffers = 0x7ffff04ac140) -> 13
glNamedBufferStorage(buffer = 13, size = 3072, data = 0x0, flags = GL_MAP_WRITE_BIT |
GL_MAP_PERSISTENT_BIT)
glMapNamedBufferRange(buffer = 13, offset = 0, length = 3072, access = GL_MAP_WRITE_BIT |
GL_MAP_INVALIDATE_BUFFER_BIT |
GL_MAP_FLUSH_EXPLICIT_BIT)
glCreateTextures(target = GL_TEXTURE_2D, n = 1, textures = 0x7fffe83e95b0) -> 1
glTextureStorage2D(texture = 1, levels = 1, internalformat = GL_RGB8, width = 32, height = 32)
glFlushMappedNamedBufferRange(buffer = 13, offset = 0, length = 3072)
glPixelStorei(pname = GL_UNPACK_ALIGNMENT, param = 1)
// fat_triangle.fs
// Fragment shader for rendering wide lines
// with GL 3.3+ with forward compatible context.
//
// To be used with fat_triangle.gs (same as line.gs) geometry shader.
//
// Not optimized.
//
// Timo Suoranta - tksuoran@gmail.com