Add Text rendering
- Add FreeType as dependency - Add MsdfGen as dependency - Add MsdfAtlasGen as dependency
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "arithmetics.hpp"
|
||||
|
||||
namespace msdfgen {
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
inline byte pixelFloatToByte(float x) {
|
||||
return byte(clamp(256.f*x, 255.f));
|
||||
}
|
||||
|
||||
inline float pixelByteToFloat(byte x) {
|
||||
return 1.f/255.f*float(x);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user