History

DEV-2840: Fix z-fighting issues in Smartboard and enable quicker positional iteration in the future

Zach Fox committed 6 years ago

Commit 8be866e1 parent 52205d22 files · +16 −2Browse files

Showing the changes to interface/src/scripting/ScreenshareScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/ScreenshareScriptingInterface.cpp+5−2
@@ -90,7 +90,8 @@ static const EntityTypes::EntityType LOCAL_SCREENSHARE_WEB_ENTITY_TYPE = EntityT · 89 unmodified lines
90static const uint8_t LOCAL_SCREENSHARE_WEB_ENTITY_FPS = 30;90static const uint8_t LOCAL_SCREENSHARE_WEB_ENTITY_FPS = 30;
91// This is going to be a good amount of work to make this work dynamically for any screensize.91// This is going to be a good amount of work to make this work dynamically for any screensize.
92// V1 will have only hardcoded values.92// V1 will have only hardcoded values.
93static const glm::vec3 LOCAL_SCREENSHARE_WEB_ENTITY_LOCAL_POSITION(0.0128f, -0.0918f, 0.0711f);93// The `z` value here is dynamic.
94static const glm::vec3 LOCAL_SCREENSHARE_WEB_ENTITY_LOCAL_POSITION(0.0128f, -0.0918f, 0.0f);
94static const glm::vec3 LOCAL_SCREENSHARE_WEB_ENTITY_DIMENSIONS(3.6790f, 2.0990f, 0.0100f);95static const glm::vec3 LOCAL_SCREENSHARE_WEB_ENTITY_DIMENSIONS(3.6790f, 2.0990f, 0.0100f);
95static const QString LOCAL_SCREENSHARE_WEB_ENTITY_URL =96static const QString LOCAL_SCREENSHARE_WEB_ENTITY_URL =
96 "https://content.highfidelity.com/Experiences/Releases/usefulUtilities/smartBoard/screenshareViewer/screenshareClient.html";97 "https://content.highfidelity.com/Experiences/Releases/usefulUtilities/smartBoard/screenshareViewer/screenshareClient.html";
@@ -241,7 +242,9 @@ void ScreenshareScriptingInterface::handleSuccessfulScreenshareInfoGet(QNetworkR · 144 unmodified lines
241 EntityItemProperties localScreenshareWebEntityProps;242 EntityItemProperties localScreenshareWebEntityProps;
242 localScreenshareWebEntityProps.setType(LOCAL_SCREENSHARE_WEB_ENTITY_TYPE);243 localScreenshareWebEntityProps.setType(LOCAL_SCREENSHARE_WEB_ENTITY_TYPE);
243 localScreenshareWebEntityProps.setMaxFPS(LOCAL_SCREENSHARE_WEB_ENTITY_FPS);244 localScreenshareWebEntityProps.setMaxFPS(LOCAL_SCREENSHARE_WEB_ENTITY_FPS);
244 localScreenshareWebEntityProps.setLocalPosition(LOCAL_SCREENSHARE_WEB_ENTITY_LOCAL_POSITION);245 glm::vec3 localPosition(LOCAL_SCREENSHARE_WEB_ENTITY_LOCAL_POSITION);
246 localPosition.z = _localWebEntityZOffset;
247 localScreenshareWebEntityProps.setLocalPosition(localPosition);
245 localScreenshareWebEntityProps.setSourceUrl(LOCAL_SCREENSHARE_WEB_ENTITY_URL);248 localScreenshareWebEntityProps.setSourceUrl(LOCAL_SCREENSHARE_WEB_ENTITY_URL);
246 localScreenshareWebEntityProps.setParentID(_smartboardEntityID);249 localScreenshareWebEntityProps.setParentID(_smartboardEntityID);
247 localScreenshareWebEntityProps.setDimensions(LOCAL_SCREENSHARE_WEB_ENTITY_DIMENSIONS);250 localScreenshareWebEntityProps.setDimensions(LOCAL_SCREENSHARE_WEB_ENTITY_DIMENSIONS);