Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ HRESULT DirectX::ComputeNormals(
#### `noexcept` Rules

- All query and utility functions that cannot fail (e.g., `IsValidVB`, `IsValidIB`) are marked `noexcept`.
- HRESULT-returning functions that do not perform heap allocation or use Standard C++ containers are `noexcept` — errors are communicated via return code, never via exceptions (e.g., `ComputeNormals`, `ReorderIB`, `FinalizeIB`, `FinalizeVB`, `CompactVB`, `OptimizeVertices`, `ComputeCullData`).
- HRESULT-returning functions that do not use Standard C++ containers are `noexcept` — errors are communicated via return code, never via exceptions (e.g., `ComputeNormals`, `ReorderIB`, `FinalizeIB`, `FinalizeVB`, `CompactVB`, `OptimizeVertices`, `ComputeCullData`). Note that `noexcept` HRESULT functions may still allocate scratch memory internally using `new (std::nothrow)` and return `E_OUTOFMEMORY` on failure — `noexcept` only means they will not throw C++ exceptions.
- HRESULT-returning functions that use `std::vector`, `std::function`, or other potentially throwing types are *not* marked `noexcept` — they may throw on allocation failure (e.g., `GenerateAdjacencyAndPointReps`, `Validate`, `Clean`, `WeldVertices`, `ComputeMeshlets`, `OptimizeFaces`).
- Constructors and functions that perform heap allocation or utilize Standard C++ containers that may throw are marked `noexcept(false)`.

Expand Down
2 changes: 1 addition & 1 deletion .nuget/directxmesh_desktop_win10.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description>This version is for Windows desktop applications using Visual Studio 2022 on Windows 10 / Windows 11 including both DirectX 11 and DirectX 12.

DirectXMesh, a shared source library for performing various geometry content processing operations including generating normals and tangent frames, triangle adjacency computations, vertex cache optimization, and meshlet generation.</description>
<releaseNotes>Matches the March 31, 2026 release on GitHub.</releaseNotes>
<releaseNotes>Matches the May 7, 2026 release on GitHub.</releaseNotes>
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=324981</projectUrl>
<repository type="git" url="https://github.com/microsoft/DirectXMesh.git" />
<icon>images\icon.jpg</icon>
Expand Down
2 changes: 1 addition & 1 deletion .nuget/directxmesh_uwp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description>This version is for Universal Windows Platform apps on Windows 10 / Windows 11 using Visual Studio 2022.

DirectXMesh, a shared source library for performing various geometry content processing operations including generating normals and tangent frames, triangle adjacency computations, vertex cache optimization, and meshlet generation.</description>
<releaseNotes>Matches the March 31, 2026 release on GitHub.</releaseNotes>
<releaseNotes>Matches the May 7, 2026 release on GitHub.</releaseNotes>
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=324981</projectUrl>
<repository type="git" url="https://github.com/microsoft/DirectXMesh.git" />
<icon>images\icon.jpg</icon>
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Releases available for download on [GitHub](https://github.com/microsoft/DirectX

## Release History

### May 7, 2026
* *breaking change* Added **nVerts** parameter to `OptimizeFaces(LRU)Ex` functions to improve input bounds checking
* Extra bounds checking for all functions that take indices via an array
* CMake project updates
* Minor comments cleanup

### March 31, 2026
* Minor code review
* VS 2026 support
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(POLICY CMP0162)
cmake_policy(SET CMP0162 NEW)
endif()

set(DIRECTXMESH_VERSION 1.7.1)
set(DIRECTXMESH_VERSION 1.7.2)

project(DirectXMesh
VERSION ${DIRECTXMESH_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion DirectXMesh/DirectXMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <DirectXCollision.h>
#include <DirectXPackedVector.h>

#define DIRECTX_MESH_VERSION 171
#define DIRECTX_MESH_VERSION 172

#if defined(_WIN32) && defined(DIRECTX_MESH_EXPORT)
#ifdef __GNUC__
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=324981

Copyright (c) Microsoft Corporation.

## March 31, 2026
## May 7, 2026

This package contains DirectXMesh, a shared source library for performing various geometry content processing operations including generating normals and tangent frames, triangle adjacency computations, vertex cache optimization, and meshlet generation.

Expand Down Expand Up @@ -56,7 +56,7 @@ For a full change history, see [CHANGELOG.md](https://github.com/microsoft/Direc

* The CMake projects require 3.21 or later.

* Starting with the April 2026 release, the OptimizeFaces(LRU)(Ex) functions now take an `nVerts` parameter in order to validate the input indices. This is a *breaking change*.
* Starting with the May 2026 release, the functions `OptimizeFaces`, `OptimizeFacesLRU`, `OptimizeFacesEx`, and `OptimizeFacesLRUEx` now take an `nVerts` parameter in order to validate the input indices. This is a *breaking change*.

```cpp
hr = OptimizeFaces(indices, nFaces, adjacency, faceRemap, vertexCache, restart);
Expand Down
4 changes: 2 additions & 2 deletions build/CompilerAndLinker.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ endif()

#--- General MSVC-like SDL options
if(MSVC)
list(APPEND COMPILER_SWITCHES "$<$<NOT:$<CONFIG:DEBUG>>:/guard:cf>")
list(APPEND COMPILER_SWITCHES /Gd /GS /Zc:forScope /Zc:inline /Zc:wchar_t $<$<NOT:$<CONFIG:DEBUG>>:/guard:cf>)
list(APPEND LINKER_SWITCHES /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO)

if(WINDOWS_STORE)
Expand Down Expand Up @@ -141,7 +141,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|IntelLLVM")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
list(APPEND COMPILER_SWITCHES /Zc:__cplusplus /Zc:inline /fp:fast /Qdiag-disable:161)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
list(APPEND COMPILER_SWITCHES /sdl /Zc:forScope /Zc:inline /Zc:wchar_t /fp:fast)
list(APPEND COMPILER_SWITCHES /sdl /fp:fast)

if(WINDOWS_STORE)
list(APPEND COMPILER_SWITCHES /await)
Expand Down
Loading