| # forays into | |
| Perfect Spatial Hashing (Lefebvre & Hoppe) | |
| http://hhoppe.com/perfecthash.pdf | |
| how it works: | |
| There are two parts: a slow encoding step, and a fast decoding step. | |
| Encoding |
| // | |
| // TinyCRT, revamp and TinyWin support by Don Williamson, 2011 | |
| // Based on http://www.codeproject.com/KB/library/tlibc.aspx and LIBCTINY by Matt Pietrek | |
| // | |
| #pragma once | |
| #ifdef USE_DEFAULT_CRT |
| #include <stdio.h> | |
| #include <stdarg.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <assert.h> | |
| #include <limits.h> | |
| #include <ctype.h> | |
| /* --------------------------------------------------------------------------- |
| #pragma once | |
| // This allows windows.h to be included first, overriding this header file, but be careful | |
| // not to do this everywhere as compile-times suffer. | |
| #ifndef _WINDOWS_ | |
| #include <basetsd.h> |
Last time I wrote a little bit about my current GUI research progress. There are some things that were misunderstood so I want to clarify some fundamental design decisions and finally write up some current problems and their solutions.
First up I want to clarify a component is not another term for what is usually refered to as widget.
Instead wigets in this implementation are made out of n >= 1 components. Components themself are just
rectangles with attributes left, right, top, bottom, center_x, center_y, width and height some behavior flags
and an optional surface to draw into. For example a scroll regions is made up out of at least three
For the last few weeks I spend some time coding, writing and cleaning up my notes from almost a year since I published nuklear.
Basically this is a possible implementation for a graphical user interface builder backend with support for an immediate mode style API. So it provides a way to define non-mutating UI state, an immediate mode style API for dynamic UI components (lists,trees,...) and a combination of both.
The core implementation is ~800 LOC without any kind of default widgets or extensions. At first this seems quite counter intuitive. However since the inherent design allows for lots of different ways to define any widget like buttons it does not make sense to provide a specific default implementation. The way this code was architectured furthermore removes the need for style/skinning configurations used in Nuklear since widget painting is just calling a small
| struct Data | |
| { | |
| Data() | |
| { | |
| } | |
| ~Data() | |
| { | |
| } | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <opml version="1.0"> | |
| <head> | |
| <title>Graphics, Games, Programming, and Physics Blogs</title> | |
| </head> | |
| <body> | |
| <outline text="Tech News" title="Tech News"> | |
| <outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com"/> | |
| <outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="http://www.polygon.com/rss/index.xml" htmlUrl="https://www.polygon.com/"/> | |
| <outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="https://www.roadtovr.com"/> |
| /*$pycgen | |
| code = """ | |
| T length(const T2& v); | |
| T length(const T3& v); | |
| T length(const T4& v); | |
| """ | |
| EmitRepl(code, "T:" + vector_types) | |
| */ | |
| //$pycgen-begin | |
| float length(const float2& v); |
