mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into one
This commit is contained in:
commit
728577dfd8
3 changed files with 19 additions and 21 deletions
|
@ -46,13 +46,14 @@ struct GPUKTXPayload {
|
|||
|
||||
memcpy(data, &_samplerDesc, sizeof(Sampler::Desc));
|
||||
data += sizeof(Sampler::Desc);
|
||||
|
||||
|
||||
// We can't copy the bitset in Texture::Usage in a crossplateform manner
|
||||
// So serialize it manually
|
||||
*(uint32*)data = _usage._flags.to_ulong();
|
||||
uint32 usageData = _usage._flags.to_ulong();
|
||||
memcpy(data, &usageData, sizeof(uint32));
|
||||
data += sizeof(uint32);
|
||||
|
||||
*(TextureUsageType*)data = _usageType;
|
||||
memcpy(data, &_usageType, sizeof(TextureUsageType));
|
||||
data += sizeof(TextureUsageType);
|
||||
|
||||
return data + PADDING;
|
||||
|
@ -77,13 +78,15 @@ struct GPUKTXPayload {
|
|||
|
||||
memcpy(&_samplerDesc, data, sizeof(Sampler::Desc));
|
||||
data += sizeof(Sampler::Desc);
|
||||
|
||||
|
||||
// We can't copy the bitset in Texture::Usage in a crossplateform manner
|
||||
// So unserialize it manually
|
||||
_usage = Texture::Usage(*(const uint32*)data);
|
||||
uint32 usageData;
|
||||
memcpy(&usageData, data, sizeof(uint32));
|
||||
_usage = Texture::Usage(usageData);
|
||||
data += sizeof(uint32);
|
||||
|
||||
_usageType = *(const TextureUsageType*)data;
|
||||
memcpy(&_usageType, data, sizeof(TextureUsageType));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -710,4 +713,4 @@ bool Texture::evalTextureFormat(const ktx::Header& header, Element& mipFormat, E
|
|||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1165,17 +1165,11 @@ function setupModelMenus() {
|
|||
});
|
||||
modelMenuAddedDelete = true;
|
||||
}
|
||||
Menu.addMenuItem({
|
||||
menuName: "Edit",
|
||||
menuItemName: "Entity List...",
|
||||
afterItem: "Entities",
|
||||
grouping: "Advanced"
|
||||
});
|
||||
|
||||
Menu.addMenuItem({
|
||||
menuName: "Edit",
|
||||
menuItemName: "Parent Entity to Last",
|
||||
afterItem: "Entity List...",
|
||||
afterItem: "Entities",
|
||||
grouping: "Advanced"
|
||||
});
|
||||
|
||||
|
@ -1297,7 +1291,6 @@ function cleanupModelMenus() {
|
|||
|
||||
Menu.removeMenuItem("Edit", "Parent Entity to Last");
|
||||
Menu.removeMenuItem("Edit", "Unparent Entity");
|
||||
Menu.removeMenuItem("Edit", "Entity List...");
|
||||
Menu.removeMenuItem("Edit", "Allow Selecting of Large Models");
|
||||
Menu.removeMenuItem("Edit", "Allow Selecting of Small Models");
|
||||
Menu.removeMenuItem("Edit", "Allow Selecting of Lights");
|
||||
|
@ -1659,8 +1652,6 @@ function handeMenuEvent(menuItem) {
|
|||
Window.promptTextChanged.connect(onPromptTextChanged);
|
||||
Window.promptAsync("URL of SVO to import", "");
|
||||
}
|
||||
} else if (menuItem === "Entity List...") {
|
||||
entityListTool.toggleVisible();
|
||||
} else if (menuItem === "Select All Entities In Box") {
|
||||
selectAllEtitiesInCurrentSelectionBox(false);
|
||||
} else if (menuItem === "Select All Entities Touching Box") {
|
||||
|
|
|
@ -789,10 +789,14 @@ var selectionDisplay = null; // for gridTool.js to ignore
|
|||
var savedDisablePreviewOptionLocked = false;
|
||||
var savedDisablePreviewOption = Menu.isOptionChecked("Disable Preview");;
|
||||
function maybeEnableHMDPreview() {
|
||||
setTabletVisibleInSecondaryCamera(true);
|
||||
DesktopPreviewProvider.setPreviewDisabledReason("USER");
|
||||
Menu.setIsOptionChecked("Disable Preview", savedDisablePreviewOption);
|
||||
savedDisablePreviewOptionLocked = false;
|
||||
// Set a small timeout to prevent sensitive data from being shown during
|
||||
// UI fade
|
||||
Script.setTimeout(function () {
|
||||
setTabletVisibleInSecondaryCamera(true);
|
||||
DesktopPreviewProvider.setPreviewDisabledReason("USER");
|
||||
Menu.setIsOptionChecked("Disable Preview", savedDisablePreviewOption);
|
||||
savedDisablePreviewOptionLocked = false;
|
||||
}, 150);
|
||||
}
|
||||
|
||||
// Function Name: fromQml()
|
||||
|
|
Loading…
Reference in a new issue