1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-02 10:48:04 +00:00

added function to_glsl to convert ld to GLSL strings

This commit is contained in:
Zeno Rogue
2020-05-09 18:30:36 +02:00
parent 4e13e05d6a
commit 306d8c3ace
2 changed files with 16 additions and 12 deletions

View File

@@ -42,6 +42,12 @@ EX void glError(const char* GLcall, const char* file, const int line) {
EX namespace glhr {
EX string to_glsl(ld x) {
char buf[64];
snprintf(buf, 64, "float(%.10e)", x);
return buf;
}
#if HDR
struct glmatrix {
GLfloat a[4][4];