Skip to content

Commit

Permalink
fixes for unity release
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomáš Malý committed Mar 21, 2019
1 parent 9018b25 commit 44f8aa4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions browser/src/vts-libbrowser/resources/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,19 @@ void Resource::updatePriority(float p)
void Resource::updateAvailability(const std::shared_ptr<vtslibs::registry
::BoundLayer::Availability> &availTest)
{
if (!fetch)
fetch = std::make_shared<FetchTaskImpl>(map->resources.resources[name]);
if (!fetch->availTest)
fetch->availTest = availTest;
auto f = fetch;
if (f)
{
if (!f->availTest)
f->availTest = availTest;
}
else
{
f = std::make_shared<FetchTaskImpl>(
map->resources.resources[name]);
f->availTest = availTest;
fetch = f;
}
}

void Resource::forceRedownload()
Expand Down
2 changes: 2 additions & 0 deletions browser/src/vts-librenderer/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,15 @@ class RendererImpl
glDisable(GL_BLEND);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
shaderSurface->bind();
enableClipDistance(true);
for (const DrawTask &it : draws->opaque)
{
DrawTask t(it);
t.flatShading = false;
t.color[0] = t.color[1] = t.color[2] = t.color[3] = 0;
drawSurface(t);
}
enableClipDistance(false);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glEnable(GL_BLEND);
CHECK_GL("rendered polygon edges");
Expand Down

0 comments on commit 44f8aa4

Please sign in to comment.