VOXELFORMAT: fixed color writing for vxm
parent
bbaaab8afc
commit
62bc102e2e
|
@ -194,7 +194,10 @@ bool VXMFormat::saveGroups(const SceneGraph& sceneGraph, const core::String &fil
|
|||
wrapBool(stream.writeUInt8(numColors))
|
||||
for (int i = 0; i < numColors; ++i) {
|
||||
const core::RGBA &matcolor = palette.colors[i];
|
||||
wrapBool(stream.writeUInt32(matcolor.rgba))
|
||||
wrapBool(stream.writeUInt8(matcolor.b))
|
||||
wrapBool(stream.writeUInt8(matcolor.g))
|
||||
wrapBool(stream.writeUInt8(matcolor.r))
|
||||
wrapBool(stream.writeUInt8(matcolor.a))
|
||||
const core::RGBA &glowcolor = palette.glowColors[i];
|
||||
const bool emissive = glowcolor.a > 0;
|
||||
wrapBool(stream.writeBool(emissive))
|
||||
|
|
|
@ -10,26 +10,26 @@ namespace voxelformat {
|
|||
class VXMFormatTest: public AbstractVoxFormatTest {
|
||||
};
|
||||
|
||||
TEST_F(VXMFormatTest, DISABLED_testLoadRGB) {
|
||||
TEST_F(VXMFormatTest, DISABLED_testRGB) {
|
||||
testRGB("rgb.vxm");
|
||||
}
|
||||
|
||||
TEST_F(VXMFormatTest, testLoad) {
|
||||
TEST_F(VXMFormatTest, testLoadVersion4) {
|
||||
canLoad("test.vxm");
|
||||
}
|
||||
|
||||
TEST_F(VXMFormatTest, testLoadFileCreatedBySandboxVoxeditVersion12) {
|
||||
TEST_F(VXMFormatTest, testLoadVersion12) {
|
||||
canLoad("test2.vxm");
|
||||
}
|
||||
|
||||
TEST_F(VXMFormatTest, testSaveVerySmallVoxel) {
|
||||
TEST_F(VXMFormatTest, testSaveSmallVolume) {
|
||||
VXMFormat f;
|
||||
testSaveSmallVolume("verysmallvolumesavetest.vxm", &f);
|
||||
testSaveSmallVolume("testSaveSmallVolume.vxm", &f);
|
||||
}
|
||||
|
||||
TEST_F(VXMFormatTest, testSaveSmallVoxel) {
|
||||
TEST_F(VXMFormatTest, testSaveLoadVoxel) {
|
||||
VXMFormat f;
|
||||
testSaveLoadVoxel("sandbox-smallvolumesavetest.vxm", &f);
|
||||
testSaveLoadVoxel("testSaveLoadVoxel.vxm", &f);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue