Merge branch 'master' of github.com:highfidelity/hifi into commandLineParametersForAutotester

This commit is contained in:
NissimHadar 2018-05-08 09:18:27 -07:00
commit 0206de01f5
2 changed files with 11 additions and 17 deletions

View file

@ -46,13 +46,14 @@ struct GPUKTXPayload {
memcpy(data, &_samplerDesc, sizeof(Sampler::Desc)); memcpy(data, &_samplerDesc, sizeof(Sampler::Desc));
data += sizeof(Sampler::Desc); data += sizeof(Sampler::Desc);
// We can't copy the bitset in Texture::Usage in a crossplateform manner // We can't copy the bitset in Texture::Usage in a crossplateform manner
// So serialize it manually // So serialize it manually
*(uint32*)data = _usage._flags.to_ulong(); uint32 usageData = _usage._flags.to_ulong();
memcpy(data, &usageData, sizeof(uint32));
data += sizeof(uint32); data += sizeof(uint32);
*(TextureUsageType*)data = _usageType; memcpy(data, &_usageType, sizeof(TextureUsageType));
data += sizeof(TextureUsageType); data += sizeof(TextureUsageType);
return data + PADDING; return data + PADDING;
@ -77,13 +78,15 @@ struct GPUKTXPayload {
memcpy(&_samplerDesc, data, sizeof(Sampler::Desc)); memcpy(&_samplerDesc, data, sizeof(Sampler::Desc));
data += sizeof(Sampler::Desc); data += sizeof(Sampler::Desc);
// We can't copy the bitset in Texture::Usage in a crossplateform manner // We can't copy the bitset in Texture::Usage in a crossplateform manner
// So unserialize it manually // So unserialize it manually
_usage = Texture::Usage(*(const uint32*)data); uint32 usageData;
memcpy(&usageData, data, sizeof(uint32));
_usage = Texture::Usage(usageData);
data += sizeof(uint32); data += sizeof(uint32);
_usageType = *(const TextureUsageType*)data; memcpy(&_usageType, data, sizeof(TextureUsageType));
return true; return true;
} }
@ -710,4 +713,4 @@ bool Texture::evalTextureFormat(const ktx::Header& header, Element& mipFormat, E
return false; return false;
} }
return true; return true;
} }

View file

@ -1165,17 +1165,11 @@ function setupModelMenus() {
}); });
modelMenuAddedDelete = true; modelMenuAddedDelete = true;
} }
Menu.addMenuItem({
menuName: "Edit",
menuItemName: "Entity List...",
afterItem: "Entities",
grouping: "Advanced"
});
Menu.addMenuItem({ Menu.addMenuItem({
menuName: "Edit", menuName: "Edit",
menuItemName: "Parent Entity to Last", menuItemName: "Parent Entity to Last",
afterItem: "Entity List...", afterItem: "Entities",
grouping: "Advanced" grouping: "Advanced"
}); });
@ -1297,7 +1291,6 @@ function cleanupModelMenus() {
Menu.removeMenuItem("Edit", "Parent Entity to Last"); Menu.removeMenuItem("Edit", "Parent Entity to Last");
Menu.removeMenuItem("Edit", "Unparent Entity"); Menu.removeMenuItem("Edit", "Unparent Entity");
Menu.removeMenuItem("Edit", "Entity List...");
Menu.removeMenuItem("Edit", "Allow Selecting of Large Models"); Menu.removeMenuItem("Edit", "Allow Selecting of Large Models");
Menu.removeMenuItem("Edit", "Allow Selecting of Small Models"); Menu.removeMenuItem("Edit", "Allow Selecting of Small Models");
Menu.removeMenuItem("Edit", "Allow Selecting of Lights"); Menu.removeMenuItem("Edit", "Allow Selecting of Lights");
@ -1659,8 +1652,6 @@ function handeMenuEvent(menuItem) {
Window.promptTextChanged.connect(onPromptTextChanged); Window.promptTextChanged.connect(onPromptTextChanged);
Window.promptAsync("URL of SVO to import", ""); Window.promptAsync("URL of SVO to import", "");
} }
} else if (menuItem === "Entity List...") {
entityListTool.toggleVisible();
} else if (menuItem === "Select All Entities In Box") { } else if (menuItem === "Select All Entities In Box") {
selectAllEtitiesInCurrentSelectionBox(false); selectAllEtitiesInCurrentSelectionBox(false);
} else if (menuItem === "Select All Entities Touching Box") { } else if (menuItem === "Select All Entities Touching Box") {