History

Merge pull request #16499 from HifiExperiments/proceduralMesh

Procedural vertex shaders

Brad Hefta-Gaub committed 6 years ago

Commit f8a97892 parents 2d56d7c 2eb0ec114 files · +254 −36Browse files

Showing the changes to interface/src/Application.cpp (1 of 14 files). Show all

Unified · Split

interface/src/Application.cpp+17−0
@@ -2109,6 +2109,23 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 2108 unmodified lines
21092109 }
21102110 return false;
21112111 });
2112+ EntityTree::setGetUnscaledDimensionsForIDOperator([this](const QUuid& id) {
2113+ if (_aboutToQuit) {
2114+ return glm::vec3(1.0f);
2115+ }
2116+
2117+ auto entity = getEntities()->getEntity(id);
2118+ if (entity) {
2119+ return entity->getUnscaledDimensions();
2120+ }
2121+
2122+ auto avatarManager = DependencyManager::get<AvatarManager>();
2123+ auto avatar = static_pointer_cast<Avatar>(avatarManager->getAvatarBySessionID(id));
2124+ if (avatar) {
2125+ return avatar->getSNScale();
2126+ }
2127+ return glm::vec3(1.0f);
2128+ });
21122129 Procedural::opaqueStencil = [](gpu::StatePointer state) { PrepareStencil::testMaskDrawShape(*state); };
21132130 Procedural::transparentStencil = [](gpu::StatePointer state) { PrepareStencil::testMask(*state); };
21142131

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t