Shtille's blog A development blog

Polyline rendering. Part 3

Overview In the previous post I created a screen space invariant width polyline rendering with rounded joins. Now I gonna cover different caps on sides. Implementation Caps can have different styles. Cap styles The cap style defines how the end points of lines are drawn. We will base cap styles on Qt version. So there will be following styl... Read more

Polyline rendering. Part 2

Overview In the previous post I created a screen space invariant width polyline rendering. Now we need to add rounding to segments. Implementation The easiest way to achieve rounding to segments is to discard pixels far than halfwidth radius distance from segment points. Coordinates transformation To calculate that distance we gonna use tex... Read more

Polyline rendering

Overview At work I was given a task to render a polyline with screen space invariant width. This includes following steps: Render polyline with simple quads (this post). Render polyline with rounded joins (second post). Render polyline with different caps on sides (third post). Render polyline with different join styles (fourth post).... Read more

Vertex buffer object capabilities

Overview I was trying to find out what is the limit of vertex buffer object allocation size in OpenGL. So I wrote the program that does such test. Process Buffer allocation with no data At first I tried just pure buffer allocation without any data with glBufferData function: // test if we can allocate buffer // -----------------------------... Read more

Site file root determination

I found a way to determine site file root. For example, we have a site with main content and a subsite. We could check for a referer header value to find out if it’s a root file request. Then we can add response cookie to make all subsequent headers have its value. // Lookup for "Referer" header value const char* referer = MHD_lookup_connectio... Read more