double precision compilation fix
parent
08623fafdc
commit
b13e41f8f9
|
@ -8,7 +8,7 @@ plugins = []
|
||||||
stubs = []
|
stubs = []
|
||||||
winstubs = []
|
winstubs = []
|
||||||
|
|
||||||
Export('SCons', 'sys', 'os', 'glob', 'resources',
|
Export('SCons', 'sys', 'os', 'glob', 'resources',
|
||||||
'plugins', 'stubs', 'winstubs')
|
'plugins', 'stubs', 'winstubs')
|
||||||
|
|
||||||
# Configure the build framework
|
# Configure the build framework
|
||||||
|
@ -25,7 +25,7 @@ if sys.platform == 'win32':
|
||||||
|
|
||||||
def build(scriptFile, exports = [], duplicate = 0):
|
def build(scriptFile, exports = [], duplicate = 0):
|
||||||
dirname = '/'.join(os.path.dirname(scriptFile).split('/')[1:])
|
dirname = '/'.join(os.path.dirname(scriptFile).split('/')[1:])
|
||||||
return SConscript(scriptFile, exports,
|
return SConscript(scriptFile, exports,
|
||||||
variant_dir=os.path.join(env['BUILDDIR'], dirname), duplicate=duplicate)
|
variant_dir=os.path.join(env['BUILDDIR'], dirname), duplicate=duplicate)
|
||||||
|
|
||||||
# ===== Build the support libraries ====
|
# ===== Build the support libraries ====
|
||||||
|
@ -59,7 +59,7 @@ env['SHLIBPREFIX']=''
|
||||||
|
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
build('src/utils/SConscript')
|
build('src/utils/SConscript')
|
||||||
# Surface scattering models
|
# Surface scattering models
|
||||||
build('src/bsdfs/SConscript')
|
build('src/bsdfs/SConscript')
|
||||||
|
|
|
@ -1109,9 +1109,9 @@ void TriMesh::writePLY(const fs::path &path) const {
|
||||||
Vector2f uv(m_texcoords[i]); memcpy(ptr, &uv, sizeof(Vector2f)); ptr += sizeof(Vector2f);
|
Vector2f uv(m_texcoords[i]); memcpy(ptr, &uv, sizeof(Vector2f)); ptr += sizeof(Vector2f);
|
||||||
}
|
}
|
||||||
if (m_colors) {
|
if (m_colors) {
|
||||||
*ptr += (uint8_t) std::max(0.0f, std::min(255.0f, m_colors[i][0] * 255.0f + 0.5f));
|
*ptr += (uint8_t) std::max(0.0f, std::min(255.0f, (float) m_colors[i][0] * 255.0f + 0.5f));
|
||||||
*ptr += (uint8_t) std::max(0.0f, std::min(255.0f, m_colors[i][1] * 255.0f + 0.5f));
|
*ptr += (uint8_t) std::max(0.0f, std::min(255.0f, (float) m_colors[i][1] * 255.0f + 0.5f));
|
||||||
*ptr += (uint8_t) std::max(0.0f, std::min(255.0f, m_colors[i][2] * 255.0f + 0.5f));
|
*ptr += (uint8_t) std::max(0.0f, std::min(255.0f, (float) m_colors[i][2] * 255.0f + 0.5f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert(ptr-vertexStorage == vertexStorageSize);
|
Assert(ptr-vertexStorage == vertexStorageSize);
|
||||||
|
|
Loading…
Reference in New Issue