Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6a74ab1
Checkpoint 1 is close
Fletterio Jul 23, 2025
e523868
Off by one error fix
Fletterio Jul 24, 2025
a54f6c6
Fix tile offsets for upload
Fletterio Jul 24, 2025
c3f7d04
Skeleton done but currently bugged, some byte offset is wrong (relate…
Fletterio Jul 28, 2025
7a5e948
Fix square bytes computation
Fletterio Jul 29, 2025
52d947d
Checkpoint 1!
Fletterio Jul 30, 2025
665559b
Save before merge
Fletterio Jul 31, 2025
a24281a
Merge + incorporate obb shrinking at the edges
Fletterio Aug 7, 2025
fc2d504
Bug: using uploaded uvs seems to stretch/not shrink along v direction
Fletterio Aug 8, 2025
e61e389
Fixed y-axis bug
Fletterio Aug 8, 2025
258920c
Diagonal computation
Fletterio Aug 10, 2025
6a1b76e
Some names are wrong here, but the example still works
Fletterio Aug 13, 2025
0ed564e
Tile tracking done
Fletterio Aug 17, 2025
f638ca6
Cleaning up the code following PR review
Fletterio Aug 19, 2025
89af347
Checkpoint for Phase 2
Fletterio Aug 20, 2025
f3532fe
Addressed Erfan PR messages
Fletterio Aug 22, 2025
888bcb1
Addressed some PR comments, checkpoint before modifying UV logic
Fletterio Aug 27, 2025
f0ba40f
Another checkpoint before modifying UV logic
Fletterio Aug 29, 2025
dc322da
Checkpoint: example mip level emulated computation
Fletterio Sep 10, 2025
2be88a5
nPoT handled!
Fletterio Sep 12, 2025
8a02379
Cleanup, some precomputes
Fletterio Sep 15, 2025
7330383
Some more brief updates
Fletterio Sep 16, 2025
452bee7
Some minor refactors, added some padding to max tile comp for viewpor…
Fletterio Sep 16, 2025
932cb74
Mirrored changes on n4ce after PR review
Fletterio Sep 17, 2025
bb3c3e8
Changes following PR review, to be moved to n4ce
Fletterio Sep 18, 2025
b232c21
Add a whole texel shift
Fletterio Sep 23, 2025
72d7930
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
AnastaZIuk Oct 12, 2025
1c12897
Linking errors on TextRendering
Fletterio Oct 14, 2025
9c1dfdc
6 month old Polyline and Hatch changes brought over from n4ce
Erfan-Ahmadi Nov 11, 2025
5791250
Bringing changes from n4ce
Erfan-Ahmadi Nov 11, 2025
3820eb1
Small MonoDeviceApp fix and update examples
Erfan-Ahmadi Nov 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions 62_CAD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ set(EXAMPLE_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/DrawResourcesFiller.h"
"${CMAKE_CURRENT_SOURCE_DIR}/SingleLineText.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/SingleLineText.h"
"${CMAKE_CURRENT_SOURCE_DIR}/GeoTexture.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/GeoTexture.h"
"${CMAKE_CURRENT_SOURCE_DIR}/Images.cpp"
"../../src/nbl/ext/TextRendering/TextRendering.cpp" # TODO: this one will be a part of dedicated Nabla ext called "TextRendering" later on which uses MSDF + Freetype
)
set(EXAMPLE_INCLUDES
Expand Down
1,309 changes: 874 additions & 435 deletions 62_CAD/DrawResourcesFiller.cpp

Large diffs are not rendered by default.

292 changes: 232 additions & 60 deletions 62_CAD/DrawResourcesFiller.h

Large diffs are not rendered by default.

117 changes: 0 additions & 117 deletions 62_CAD/GeoTexture.cpp

This file was deleted.

64 changes: 0 additions & 64 deletions 62_CAD/GeoTexture.h

This file was deleted.

66 changes: 45 additions & 21 deletions 62_CAD/Hatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ static constexpr float64_t FillPatternShapeExtent = 32.0;

void line(std::vector<CPolyline>& polylines, float64_t2 begin, float64_t2 end)
{
std::vector<float64_t2> points = {
std::array<float64_t2, 2> points = {
begin, end
};
CPolyline polyline;
Expand Down Expand Up @@ -846,15 +846,23 @@ void checkered(std::vector<CPolyline>& polylines, const float64_t2& offset)
float64_t2(0.0, 1.0),
};
{
std::vector<float64_t2> points;
points.reserve(squarePointsCW.size());
for (const auto& p : squarePointsCW) points.push_back(p * FillPatternShapeExtent + offset);
std::array<float64_t2, 5> points;
auto i = 0u;
for (const auto& p : squarePointsCW)
{
points[i] = p * FillPatternShapeExtent + offset;
i++;
}
polyline.addLinePoints(points);
}
{
std::vector<float64_t2> points;
points.reserve(squarePointsCW.size());
for (const auto& p : squarePointsCW) points.push_back((p + float64_t2(0.5, -0.5)) * FillPatternShapeExtent + offset);
std::array<float64_t2, 5> points;
auto i = 0u;
for (const auto& p : squarePointsCW)
{
points[i] = (p + float64_t2(0.5, -0.5)) * FillPatternShapeExtent + offset;
i++;
}
polyline.addLinePoints(points);
}
polylines.push_back(std::move(polyline));
Expand Down Expand Up @@ -885,16 +893,24 @@ void diamonds(std::vector<CPolyline>& polylines, const float64_t2& offset)

// Outer
{
std::vector<float64_t2> points;
points.reserve(diamondPointsCW.size());
for (const auto& p : diamondPointsCW) points.push_back(p * outerSize + origin);
std::array<float64_t2, 5> points;
auto i = 0u;
for (const auto& p : diamondPointsCW)
{
points[i] = p * outerSize + origin;
i++;
}
polyline.addLinePoints(points);
}
// Inner
{
std::vector<float64_t2> points;
points.reserve(diamondPointsCCW.size());
for (const auto& p : diamondPointsCCW) points.push_back(p * innerSize + origin);
std::array<float64_t2, 5> points;
auto i = 0u;
for (const auto& p : diamondPointsCCW)
{
points[i] = p * innerSize + origin;
i++;
}
polyline.addLinePoints(points);
}
polylines.push_back(std::move(polyline));
Expand All @@ -915,9 +931,13 @@ void crossHatch(std::vector<CPolyline>& polylines, const float64_t2& offset)
float64_t2(0.375, 0.0),
};
{
std::vector<float64_t2> points;
points.reserve(outerPointsCW.size());
for (const auto& p : outerPointsCW) points.push_back(p * FillPatternShapeExtent + offset);
std::array<float64_t2, 9u> points;
auto i = 0u;
for (const auto& p : outerPointsCW)
{
points[i] = p * FillPatternShapeExtent + offset;
i++;
}
polyline.addLinePoints(points);
}

Expand All @@ -930,9 +950,13 @@ void crossHatch(std::vector<CPolyline>& polylines, const float64_t2& offset)
};
{
float64_t2 origin = float64_t2(FillPatternShapeExtent/2.0, FillPatternShapeExtent/2.0) + offset;
std::vector<float64_t2> points;
points.reserve(diamondPointsCCW.size());
for (const auto& p : diamondPointsCCW) points.push_back(p * 0.75 * FillPatternShapeExtent + origin);
std::array<float64_t2, 5u> points;
auto i = 0u;
for (const auto& p : diamondPointsCCW)
{
points[i] = p * 0.75 * FillPatternShapeExtent + origin;
i++;
}
polyline.addLinePoints(points);
}
polylines.push_back(std::move(polyline));
Expand All @@ -948,7 +972,7 @@ void hatch(std::vector<CPolyline>& polylines, const float64_t2& offset)
{
float64_t2 radiusOffsetTL = float64_t2(+lineDiameter / 2.0, +lineDiameter / 2.0) * FillPatternShapeExtent / 8.0;
float64_t2 radiusOffsetBL = float64_t2(-lineDiameter / 2.0, -lineDiameter / 2.0) * FillPatternShapeExtent / 8.0;
std::vector<float64_t2> points = {
std::array<float64_t2, 5u> points = {
basePt0 + radiusOffsetTL,
basePt0 + radiusOffsetBL, // 0
basePt1 + radiusOffsetBL, // 1
Expand Down Expand Up @@ -1052,7 +1076,7 @@ void reverseHatch(std::vector<CPolyline>& polylines, const float64_t2& offset)
{
float64_t2 radiusOffsetTL = float64_t2(-lineDiameter / 2.0, +lineDiameter / 2.0) * FillPatternShapeExtent / 8.0;
float64_t2 radiusOffsetBL = float64_t2(+lineDiameter / 2.0, -lineDiameter / 2.0) * FillPatternShapeExtent / 8.0;
std::vector<float64_t2> points = {
std::array<float64_t2, 5u> points = {
basePt0 + radiusOffsetTL,
basePt1 + radiusOffsetTL, // 0
basePt1 + radiusOffsetBL, // 1
Expand Down
Loading