An implementation of David Eberly's mesh clipping algorithm with demo program in odin. See comment at top of file for controls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static uint8_t codepage_437_utf8[] = | |
{ | |
0x0, 0xE2, 0x98, 0xBA, 0xE2, 0x98, 0xBB, 0xE2, 0x99, 0xA5, 0xE2, 0x99, 0xA6, 0xE2, 0x99, 0xA3, | |
0xE2, 0x99, 0xA0, 0xE2, 0x80, 0xA2, 0xE2, 0x97, 0x98, 0x9, 0xA, 0xE2, 0x99, 0x82, 0xE2, 0x99, | |
0x80, 0xA, 0xE2, 0x99, 0xAB, 0xE2, 0x98, 0xBC, 0xE2, 0x96, 0xBA, 0xE2, 0x97, 0x84, 0xE2, 0x86, | |
0x95, 0xE2, 0x80, 0xBC, 0xC2, 0xB6, 0xC2, 0xA7, 0xE2, 0x96, 0xAC, 0xE2, 0x86, 0xA8, 0xE2, 0x86, | |
0x91, 0xE2, 0x86, 0x93, 0xE2, 0x86, 0x92, 0xE2, 0x86, 0x90, 0xE2, 0x88, 0x9F, 0xE2, 0x86, 0x94, | |
0xE2, 0x96, 0xB2, 0xE2, 0x96, 0xBC, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, | |
0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, | |
0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, |
If you've ever watched Casey Muratori's original ImGui video you may be familiar with this approach to hit testing in an immediate mode UI:
void ui_set_next_hot(UI_ID id)
{
ui->next_hot = id;
}
void ui_end_frame()
{