Merge branch 'master' into master
commit
a1a1958a7a
|
@ -16,7 +16,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter, windows-msvc-hunter]
|
name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++]
|
||||||
# For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux.
|
# For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux.
|
||||||
include:
|
include:
|
||||||
- name: windows-latest-cl.exe
|
- name: windows-latest-cl.exe
|
||||||
|
@ -35,15 +35,6 @@ jobs:
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
cxx: g++
|
cxx: g++
|
||||||
cc: gcc
|
cc: gcc
|
||||||
- name: ubuntu-gcc-hunter
|
|
||||||
os: ubuntu-latest
|
|
||||||
toolchain: ninja-gcc-cxx17-fpic
|
|
||||||
- name: macos-clang-hunter
|
|
||||||
os: macos-latest
|
|
||||||
toolchain: ninja-clang-cxx17-fpic
|
|
||||||
- name: windows-msvc-hunter
|
|
||||||
os: windows-latest
|
|
||||||
toolchain: ninja-vs-win64-cxx17
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -55,25 +46,11 @@ jobs:
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
|
||||||
- name: Set Compiler Environment
|
- name: Set Compiler Environment
|
||||||
if: "!endsWith(matrix.name, 'hunter')"
|
|
||||||
uses: lukka/set-shell-env@v1
|
uses: lukka/set-shell-env@v1
|
||||||
with:
|
with:
|
||||||
CXX: ${{ matrix.cxx }}
|
CXX: ${{ matrix.cxx }}
|
||||||
CC: ${{ matrix.cc }}
|
CC: ${{ matrix.cc }}
|
||||||
|
|
||||||
- name: Set Compiler Environment for Hunter on Windows
|
|
||||||
if: startsWith(matrix.name, 'windows') && endsWith(matrix.name, 'hunter')
|
|
||||||
uses: lukka/set-shell-env@v1
|
|
||||||
with:
|
|
||||||
VS160COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools
|
|
||||||
|
|
||||||
- name: Checkout Hunter toolchains
|
|
||||||
if: endsWith(matrix.name, 'hunter')
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: cpp-pm/polly
|
|
||||||
path: cmake/polly
|
|
||||||
|
|
||||||
- name: Cache DX SDK
|
- name: Cache DX SDK
|
||||||
id: dxcache
|
id: dxcache
|
||||||
if: contains(matrix.name, 'windows')
|
if: contains(matrix.name, 'windows')
|
||||||
|
|
|
@ -395,7 +395,10 @@ void Q3BSPFileImporter::createTriangleTopology(const Q3BSP::Q3BSPModel *pModel,
|
||||||
m_pCurrentFace->mIndices = new unsigned int[3];
|
m_pCurrentFace->mIndices = new unsigned int[3];
|
||||||
m_pCurrentFace->mIndices[idx] = vertIdx;
|
m_pCurrentFace->mIndices[idx] = vertIdx;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
m_pCurrentFace->mIndices[idx] = vertIdx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
pMesh->mVertices[vertIdx].Set(pVertex->vPosition.x, pVertex->vPosition.y, pVertex->vPosition.z);
|
pMesh->mVertices[vertIdx].Set(pVertex->vPosition.x, pVertex->vPosition.y, pVertex->vPosition.z);
|
||||||
pMesh->mNormals[vertIdx].Set(pVertex->vNormal.x, pVertex->vNormal.y, pVertex->vNormal.z);
|
pMesh->mNormals[vertIdx].Set(pVertex->vNormal.x, pVertex->vNormal.y, pVertex->vNormal.z);
|
||||||
|
|
|
@ -99,12 +99,12 @@ bool DefaultIOSystem::Exists(const char *pFile) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
FILE *file = ::fopen(pFile, "rb");
|
struct stat statbuf;
|
||||||
if (!file) {
|
stat(pFile, &statbuf);
|
||||||
|
// test for a regular file
|
||||||
|
if (!S_ISREG(statbuf.st_mode)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
::fclose(file);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -116,6 +116,7 @@ IOStream *DefaultIOSystem::Open(const char *strFile, const char *strMode) {
|
||||||
ai_assert(strFile != nullptr);
|
ai_assert(strFile != nullptr);
|
||||||
ai_assert(strMode != nullptr);
|
ai_assert(strMode != nullptr);
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::wstring name = Utf8ToWide(strFile);
|
std::wstring name = Utf8ToWide(strFile);
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
|
@ -126,6 +127,7 @@ IOStream *DefaultIOSystem::Open(const char *strFile, const char *strMode) {
|
||||||
#else
|
#else
|
||||||
file = ::fopen(strFile, strMode);
|
file = ::fopen(strFile, strMode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue