1bea8e1eac
-Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
37 lines
780 B
C++
37 lines
780 B
C++
#include "lightmapper.h"
|
|
|
|
LightmapDenoiser *(*LightmapDenoiser::create_function)() = nullptr;
|
|
|
|
Ref<LightmapDenoiser> LightmapDenoiser::create() {
|
|
if (create_function) {
|
|
return Ref<LightmapDenoiser>(create_function());
|
|
}
|
|
return Ref<LightmapDenoiser>();
|
|
}
|
|
|
|
Lightmapper::CreateFunc Lightmapper::create_custom = nullptr;
|
|
Lightmapper::CreateFunc Lightmapper::create_gpu = nullptr;
|
|
Lightmapper::CreateFunc Lightmapper::create_cpu = nullptr;
|
|
|
|
Ref<Lightmapper> Lightmapper::create() {
|
|
Lightmapper *lm = nullptr;
|
|
if (create_custom) {
|
|
lm = create_custom();
|
|
}
|
|
|
|
if (!lm && create_gpu) {
|
|
lm = create_gpu();
|
|
}
|
|
|
|
if (!lm && create_cpu) {
|
|
lm = create_cpu();
|
|
}
|
|
if (!lm) {
|
|
return Ref<Lightmapper>();
|
|
} else {
|
|
return Ref<Lightmapper>(lm);
|
|
}
|
|
}
|
|
|
|
Lightmapper::Lightmapper() {
|
|
}
|