Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make STL loader/writer and PLY writer work again#901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
YasInvolved wants to merge36 commits intomaster
base:master
Choose a base branch
Loading
fromyas_mesh_loaders
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
36 commits
Select commitHold shift + click to select a range
c19ff9e
enable STL loader and writer in CMake
YasInvolvedJul 12, 2025
549ada6
enable PLY writer too
YasInvolvedJul 12, 2025
5e6316d
comment out initialize function for further inspection, implement mis…
YasInvolvedJul 14, 2025
f522af5
move SContext to .cpp and implement utility functions that used it in…
YasInvolvedJul 14, 2025
0f67f88
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla …
YasInvolvedJul 19, 2025
80ad67f
default off PLY and STL writers for now, fix CSTLMeshLoader initializ…
YasInvolvedJul 20, 2025
84279e5
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla …
YasInvolvedJul 23, 2025
1860005
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla …
YasInvolvedJul 29, 2025
554897d
use types from hlsl namespace
YasInvolvedJul 29, 2025
a8728a8
position and normal views
YasInvolvedJul 30, 2025
75576af
put missing TODO
YasInvolvedJul 30, 2025
d4e6745
make STL loader work
YasInvolvedJul 30, 2025
c227b70
get colors working?
YasInvolvedJul 31, 2025
5eef9a9
calculate normal if not present
YasInvolvedJul 31, 2025
45ed81d
remove lzma files pushed by accident
YasInvolvedJul 31, 2025
b3bf45d
enable STL loader
YasInvolvedJul 31, 2025
c3140ea
disable some old code to make STL writer compile
YasInvolvedJul 31, 2025
f670252
STL binary data writer
YasInvolvedJul 31, 2025
d3a01ae
delete implemented stuff from disabled code, modify todos
YasInvolvedJul 31, 2025
11d315c
detect IndexType
YasInvolvedJul 31, 2025
52a669d
reuse success variable instead of creating a new one all the time
YasInvolvedJul 31, 2025
252c92c
rework ascii writer code, add type aliases to save some typing
YasInvolvedJul 31, 2025
feabf3a
use different examples branch, success variable can't actually be reused
YasInvolvedAug 5, 2025
da2fe3e
fix NaN normals
YasInvolvedAug 6, 2025
7b9e906
comment vertex color code instead of disabling it
YasInvolvedAug 6, 2025
9602989
stop reusing success variable across the whole file, update header te…
YasInvolvedAug 6, 2025
f59ea88
don't assume index type in binary writer, fix mistake
YasInvolvedAug 6, 2025
e890923
reenable PLY writer, correct function implementations
YasInvolvedAug 6, 2025
e73b0bd
get it compiling, write a basic ply header
YasInvolvedAug 6, 2025
e608929
correct mistake in normal writing
YasInvolvedAug 13, 2025
5576403
make ply loader recognize uint and uint32 types
YasInvolvedAug 13, 2025
1f1fa06
write ply header
YasInvolvedAug 13, 2025
1e43823
basic rewrite of ply text content writing function
YasInvolvedAug 13, 2025
9b3ff77
ensure that StartPointer <= LineEndPointer in the assertion before ca…
YasInvolvedAug 24, 2025
bc9b371
make readVertex correctly process the vertices in ascii format
YasInvolvedAug 31, 2025
f3bf69e
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla …
YasInvolvedAug 31, 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
2 changes: 2 additions & 0 deletionsinclude/nbl/asset/interchange/IGeometryWriter.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,6 +26,8 @@ class IGeometryWriter : public IAssetWriter
private:
};

inline IGeometryWriter::~IGeometryWriter() { }

}

#endif
6 changes: 3 additions & 3 deletionssrc/nbl/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,10 +52,10 @@ include(common)
option(_NBL_COMPILE_WITH_MTL_LOADER_ "Compile with MTL Loader" OFF) #default off until Material Compiler 2
option(_NBL_COMPILE_WITH_OBJ_LOADER_ "Compile with OBJ Loader" OFF) #default off until Material Compiler 2
#option(_NBL_COMPILE_WITH_OBJ_WRITER_ "Compile with OBJ Writer" ON) uncomment when writer exists
option(_NBL_COMPILE_WITH_STL_LOADER_ "Compile with STL Loader"OFF) #default off until reimplemented
option(_NBL_COMPILE_WITH_STL_WRITER_ "Compile with STL Writer"OFF) #default off until reimplemented
option(_NBL_COMPILE_WITH_STL_LOADER_ "Compile with STL Loader"ON)
option(_NBL_COMPILE_WITH_STL_WRITER_ "Compile with STL Writer"ON)
option(_NBL_COMPILE_WITH_PLY_LOADER_ "Compile with PLY Loader" ON)
option(_NBL_COMPILE_WITH_PLY_WRITER_ "Compile with PLY Writer"OFF) #default off until reimplemented
option(_NBL_COMPILE_WITH_PLY_WRITER_ "Compile with PLY Writer"ON)
option(_NBL_COMPILE_WITH_JPG_LOADER_ "Compile with JPG Loader" ON)
option(_NBL_COMPILE_WITH_JPG_WRITER_ "Compile with JPG Writer" ON)
option(_NBL_COMPILE_WITH_PNG_LOADER_ "Compile with PNG Loader" ON)
Expand Down
2 changes: 1 addition & 1 deletionsrc/nbl/asset/IAssetManager.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -121,7 +121,7 @@ void IAssetManager::initializeMeshTools()
void IAssetManager::addLoadersAndWriters()
{
#ifdef _NBL_COMPILE_WITH_STL_LOADER_
addAssetLoader(core::make_smart_refctd_ptr<asset::CSTLMeshFileLoader>(this));
addAssetLoader(core::make_smart_refctd_ptr<asset::CSTLMeshFileLoader>());
#endif
#ifdef _NBL_COMPILE_WITH_PLY_LOADER_
addAssetLoader(core::make_smart_refctd_ptr<asset::CPLYMeshFileLoader>());
Expand Down
34 changes: 23 additions & 11 deletionssrc/nbl/asset/interchange/CPLYMeshFileLoader.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,21 +63,23 @@ struct SContext
{
static E_FORMAT getType(const char* typeString)
{
if (strcmp(typeString, "char")==0 || strcmp(typeString, "int8")==0)
if (strcmp(typeString, "char") ==0 || strcmp(typeString, "int8") ==0)
return EF_R8_SINT;
else if (strcmp(typeString, "uchar")==0 || strcmp(typeString, "uint8")==0)
else if (strcmp(typeString, "uchar") ==0 || strcmp(typeString, "uint8") ==0)
return EF_R8_UINT;
else if (strcmp(typeString, "short")==0 || strcmp(typeString, "int16")==0)
else if (strcmp(typeString, "short") ==0 || strcmp(typeString, "int16") ==0)
return EF_R16_SINT;
else if (strcmp(typeString, "ushort")==0 || strcmp(typeString, "uint16")==0)
else if (strcmp(typeString, "ushort") ==0 || strcmp(typeString, "uint16") ==0)
return EF_R16_UINT;
else if (strcmp(typeString, "long")==0 || strcmp(typeString, "int")==0 || strcmp(typeString, "int16")==0)
else if (strcmp(typeString, "long") ==0 || strcmp(typeString, "int") ==0 || strcmp(typeString, "int16") ==0)
return EF_R32_SINT;
else if (strcmp(typeString, "ulong")==0 || strcmp(typeString, "uint16")==0)
else if (strcmp(typeString, "ulong") ==0 || strcmp(typeString, "uint16") ==0)
return EF_R32_UINT;
else if (strcmp(typeString, "float")==0 || strcmp(typeString, "float32")==0)
else if (strcmp(typeString, "uint") == 0 || strcmp(typeString, "uint32") == 0)
return EF_R32_UINT;
else if (strcmp(typeString, "float") == 0 || strcmp(typeString, "float32") == 0)
return EF_R32_SFLOAT;
else if (strcmp(typeString, "double")==0 || strcmp(typeString, "float64")==0)
else if (strcmp(typeString, "double") ==0 || strcmp(typeString, "float64") ==0)
return EF_R64_SFLOAT;
else
return EF_UNKNOWN;
Expand DownExpand Up@@ -240,7 +242,7 @@ struct SContext
}
// process the next word
{
assert(LineEndPointer<=EndPointer);
assert(StartPointer <= LineEndPointer &&LineEndPointer<=EndPointer);
const std::array<const char,3> WhiteSpace = {'\0',' ','\t'};
auto wordEnd = std::find_first_of(StartPointer,LineEndPointer,WhiteSpace.begin(),WhiteSpace.end());
// null terminate the next word
Expand DownExpand Up@@ -403,8 +405,18 @@ struct SContext
encodePixels(it.dstFmt,it.ptr,&tmp);
}
}
else
getData(it.ptr,prop.type);
else if (IsBinaryFile)
getData(it.ptr, prop.type);
else if (isIntegerFormat(prop.type))
{
const widest_int_t i = getInt(prop.type);
*reinterpret_cast<widest_int_t*>(it.ptr) = i;
}
else if (isFloatingPointFormat(prop.type))
{
hlsl::float32_t i = static_cast<hlsl::float32_t>(getFloat(prop.type));
*reinterpret_cast<hlsl::float32_t*>(it.ptr) = i;
}
//
it.ptr += it.stride;
}
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp