Skip to content

Instantly share code, notes, and snippets.

This note simply gathers some info and thoughts on building Node Editor, especially in an
immediate mode setting.
Q: How does imgui render rounded rects?
Check imgui AddRectFilled
Imgui drawing api is closer to nanoVG
- Path is kept
- Contents are modified based on path
@mhalber
mhalber / quat_rot.txt
Created March 31, 2019 03:56
quaternion rotation
In this stackoverflow question[1] user ltjax provides an answer on the order of applying quaternions to
accumulate rotations. The answer makes an interesting claim that the proposed order of quaternion
multiplications:
(1) cameraOrientation = framePitch * cameraOrientation * frameYaw
is equivalent to storing the 'Yaw' and 'Pitch' angles separately. It is an interesting observation,
but no reasoning, or proof is given.
For the rest of this discussion we will assume lab 1-2-3 sequence[2], where we first roll the
@mhalber
mhalber / background_gradients.c
Created May 9, 2017 21:46
OpenGL Gradient Background
// background_gradients.c
// Author: Maciej Halber
// Compiled on macOS 10.12.4 with :
// clang --std=c11 -lglfw3 -framework OpenGL background_gradients.c -o background_gradients
#include <stdio.h>
#include <stdlib.h>
#if defined(__APPLE__)
#include <OpenGL/gl3.h>