Kostiantyn's Blog

rss icon

Writing an OBS plugin with .NET NativeAOT

.NET 7 release is really soon, but I cannot wait to try one of its newest additions. Usually, a .NET application consists of IL code that is compiled Just-In-Time (by a JIT compiler) when the application is launched. NativeAOT is a .NET feature that allows compiling any .NET project into native assembly code directly.

. . .

Win32 API: Connecting a window to OpenGL via Silk.NET

Let's recap what we can already do. In the last post, we learnt how to open a Win32 window with C# and draw something on it. However, usually, for performance reasons, one would use the video card for drawing instead of doing it on the CPU as we did there. To use the video card, one would use some kind of graphics backend like OpenGL, DirectX or Vulkan. In this post, we will add OpenGL to our little happy window.

. . .

The War

The War. What a frightening title. Well, since 5 AM on the 24th of February this became a reality for all Ukrainians. I vividly remember how I was woken up and told that it started. Sounds of rockets exploding around the city woke up sleeping people in Kyiv. We started packing stuff up. No panic, just methodically preparing for the worst.

. . .

Win32 API: How to open a window from C#

Modern C# and the .NET platform usually abstracts all the underlying platform stuff away (e.g. see Kestrel, Windows Forms, etc.). But isn't it cool to use the same basic primitives that the teams building the frameworks use? An additional perk is that you can have much more control over that! And it's fun.

. . .

Generating .NET interop bindings via ClangSharp

Sometimes you want to write a .NET application that talks to an unmanaged library. Your first step? To google bindings for that library. But what if there are no bindings for such a library? Well, you can generate them yourself!

. . .

Connecting to Tapo lamps from F#

I am a C# programmer by day, but F# enthusiast by night. I love how the language allows me to be explicit in important things, but implicit in things that the compiler can figure out on it's own.

. . .

i18n and MessageFormat

Recently, I have made a contribution to an open source project MessageFormat.net. The library implements MessageFormat ICU specification for .NET. I figure, this is a good opportunity to talk about how a standardized format is leveraged by programmers and translators to work together and localize their product.

. . .

Blazor Secret Santa or How to side project for fun and profit

I struggle with side projects a lot. Usually, I am either too exhausted from my day job or can't find a thing I am passionate about. However, one small side project ticked all the boxes in my brain.

. . .

API Client with C# Source Generators

Ever since the c# source generators were announced, I was wondering what are real-world examples where one would reasonably use them. I am working on web applications, but I do not seek performance gains on a gigantic planet-level scale. This crosses out most performance use-cases for me. What I do write at work is web APIs, sometimes facing other services. That is the direction I want to explore.

. . .

Hello, blog!

I usually keep everything to myself or colleagues, but Scott Hanselman inspired me to start inviting other people to accompany me during my adventures. I read that My words are wasted, so I decided to try writing about things I discover, work with, and have something to say about.

. . .