Shtille's blog A development blog

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

CMake based project migration to Conan

Overview Conan is pretty popular package manager. It’s very useful to not keep all you thirdparty dependecies up-to-date manually. Pros Very easy to update dependencies Cons Another level of abstraction above CMake Additional learning curve to Conan’s API Dependencies may pull own dependencies normally you would rid of Need to con... Read more