Skip to content

mdodis/vd-libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

431 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vd-libs logo

A collection of header-only libraries and utility programs

Documentation

Libraries

Library Description Logo
IN PROGRESS
vd_fw.h C Windowing library
vd.h C base for programing, includes a bunch of data structures, a test system, allocators etc...
vd_cg.h C math library
vd_docuspec.h Kinda like Markdown, but simpler
VERY IN PROGRESS
vd_cgla.h Aliases for enums from common graphics APIs
vd_debug.h C profiling library
vd_inix.h C parser for ini-extended format (ini with multiline strings '@> @<')
vd_input.h Aliases for enum from input APIs into a common set
vd_ui.h WIP immediate mode UI library, inspired by Ryan Fleury's posts on Substack
vd_um.h WIP immediate mode 3D shape drawing and gizmo library
vd_vk.h C Vulkan utility library
UTILITIES
vd_imgui.h Handwritten translation layer for Dear ImGui, which can be adapted into fptr struct

Programs

Program Description
docuspec_html.c WIP Example of generating html with vd_docuspec
embed.c Takes in input file path, spits out c unsigned char array for embedding into applications
fontello.c Takes in a Fontello config.json file, outputs C compatible enums
gamecontrollerdb_gen.c vd_fw Builds RGCDB based on input file
printf_specifiers.c WIP listing of all printf specifiers to help with writing your own printf implementation
ryu.c WIP implementation of ryu floating point printing algorithm
sembd.c Takes in an input file path, spits out C macro string aligned nicely
test.c Runs all of the tests
windisplays.c Lists all of the Windows display adapters with friendly names
winhidpi_dump.c Dumps all HID devices on Windows

Samples

Name Description
gl_window.c vd_fw Basic window with OpenGL
gl_drag_area.c vd_fw Sample for borderless window drag area
gl_rectangles.c vd_fw OpenGL 2D rectangles
gl_camera.c vd_fw Camera
gl_cube.c vd_fw Cube
gl_cubeapp.c vd_fw Sample from page tutorial
gl_gamepad.c vd_fw Gamepad Testing Utility
gl_hotload.c vd_fw OpenGL shader hot reloading
gl_10.c vd_fw OpenGL 1.0
gl_ed.c vd_fw Sample of an editor-like program
dx_window.cpp vd_fw DirectX11
fw_all.cpp vd_fw OpenGL/DirectX11
win32_direct_manipulation.cpp Direct Manipulation API usage
gl_dialogs.c WIP vd_dlg example
ui_basic.c WIP vd_ui example
um_basic.c WIP vd_um example
au_sin.c WIP Audio Library sample

Compilation

Windows

Requirements

  • MSVC

Compile a C sample

.\\scripts\\windows\\build.bat -m debug -s <sample>

Compile a C program

.\\scripts\\windows\\build.bat -m debug -p <program name>

Compile a C++ sample

.\\scripts\\windows\\build.bat -m debug -cpp -s <sample>

Compile a C++ program

.\\scripts\\windows\\build.bat -m debug -cpp -p <program name>

MacOS

Requirements

  • XCode Command Line Tools & SDK

Compile a sample

.\\scripts\\macos\\build.bat -s <sample>

Compile a program

.\\scripts\\macos\\build.bat -p <program name>