Miscellaneous small code snippets.
C++ C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DisplaySettingsTest
PrintStream
IsLog10.c
QueryPerformanceCounterTest.cpp
README.md
VulkanAfterCrash.h

README.md

Miscellaneous small code snippets.

PrintStream

A hierarchy of classes that represent abstract concept of a text-based stream that can be printed into, using methods like print(const char* str), printf(const char* format, ....) etc. Derived classes offer printing to console (standard output), to file, to memory buffer and more.

DisplaySettingsTest

A simple Windows console C program that demonstrates how to enumerate and change display modes (screen resolution and refresh rate). See my blog post: How to change display mode using WinAPI?.

IsLog10.c

Simple C program demonstrating multiple solutions to a question: "Write a function that checks whether an integer number is a power of 10." Contains a set of tests. See my blog post: How to check if an integer number is a power of 10?.

QueryPerformanceCounterTest.cpp

Simple C++ console program that tests how long it takes to call WinAPI function QueryPerformanceCounter. See my blog post: When QueryPerformanceCounter call takes long time.

VulkanAfterCrash.h

Simple, single-header, C++ library for Vulkan that simplifies writing 32-bit markers to a buffer that can be read after graphics driver crash and thus help you find out which specific draw call or other command caused the crash, pretty much like NVIDIA Aftermath library for Direct3D 11/12. See my blog post: Debugging Vulkan driver crash - equivalent of NVIDIA Aftermath.