-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
for (int32_t y = 0; y < level.dim; y++) { | ||
for (int32_t x = 0; x < level.dim; x++) { | ||
const int32_t i = y * level.dim + x; | ||
std::memset(image.data.get(), 0, image.bytes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed if all bits are being set in the for loop below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the loop doesn't set all bits bc there is an empty 254px border around the image (need 1px border, but also need texture to be power of 2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/mbgl/geometry/dem_data.cpp
Outdated
set(-1, -1, get(0, 0)); | ||
set(dim, -1, get(dim - 1, 0)); | ||
set( -1, dim, get(0, dim - 1)); | ||
set(dim, dim, get(dim - 1, dim - 1)); | ||
loaded = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer need loaded
flag ?
test/geometry/dem_data.test.cpp
Outdated
|
||
} | ||
|
||
dem0.backfillBorder(dem1, 0, -1); | ||
// backfills TopCenter neighbor | ||
for (int x = 0; x < 4; x++) { | ||
EXPECT_TRUE(dem0.level.get(x, -1) == dem1.level.get(x, 3)); | ||
EXPECT_TRUE(dem0.get(x, -1) == dem1.get(x, 3)); | ||
} | ||
|
||
dem0.backfillBorder(dem1, 1, 0); | ||
// backfills Right neighb// backfulls TopRight neighboror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typos
126a178
to
ddaae82
Compare
0b491fa
to
81d425c
Compare
ddaae82
to
e633333
Compare
add DEMPyramid class add raster-dem source and hillshade layer types update with layer-specific lighting properties fix build errors use 3dpass for hillshade prepare step fix DEM population, change border to int32 update shaders and fix rendering update gl-js sha and un-ignore hillshade render tests start backfill border logic remove unused dem pyramid code implement backfill border use bitmask to keep track of backfilled neighbors fix tests TileCache::get -> TileCache::pop, add new getter fix node build remove unnecessary std::move override/final onTileChanged update hillshade shaders android style code update hillshade shaders appease clang-tidy address review comments use enum for neighboring tiles enforce+update DEMTileNeighbors type add RasterDEMTile test clean up DEMPyramid define constructor for DEMPyramid test DEMPyramid DEMPyramid->DEMData return reference to DEMData instead of pointer refactor backfillBorder owner fix texture filter and wrap settings remove hardcoded tilesizes and allow for @2x tile requests address review comments make RasterDEMSource inherit from RasterSource (#10952) comment DEMData::backfillBorder guard against redoing backfill work for the borderTile add RasterDEMSource tests reenable all builds ios codegen remove Level class (#10964) cleanup and add hillshade to android style layer exceptions dim as uint32 guard against nullptr borderBucket
No description provided.