Skip to content

Commit d262422

Browse files
Update to Cubism 5 SDK for Native R5 beta3
1 parent 6d9f59b commit d262422

102 files changed

Lines changed: 6126 additions & 1950 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [5-r.5-beta.3] - 2026-01-29
8+
9+
### Added
10+
11+
* Add the classes `CubismOffscreenRenderTarget_XXX` and `CubismOffscreenManager_XXX`, as well as the interfaces `ICubismOffscreenRenderTarget` and `ICubismOffscreenManager`, in order to reuse `CubismRenderTarget_XXX` for Offscreen rendering.
12+
* Add support for Blend mode and Offscreen drawing in Vulkan.
13+
14+
### Fixed
15+
16+
* Fix an issue that caused performance degradation on Metal.
17+
* Fix clipping mask pre-processing by consolidating functions.
18+
* Fix unused macros in OpenGL.
19+
* Fix incomplete OpenGL shader issue.
20+
* Fix incorrect UV coordinates when using masks with D3D9 and D3D11.
21+
* Fix typos in `CubismFramework.hpp`.
22+
723

824
## [5-r.5-beta.2] - 2025-10-30
925

@@ -517,6 +533,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
517533
* Fix invalid expressions of `CubismCdiJson`.
518534

519535

536+
[5-r.5-beta.3]: https://github.com/Live2D/CubismNativeFramework/compare/5-r.5-beta.2...5-r.5-beta.3
520537
[5-r.5-beta.2]: https://github.com/Live2D/CubismNativeFramework/compare/5-r.5-beta.1...5-r.5-beta.2
521538
[5-r.5-beta.1]: https://github.com/Live2D/CubismNativeFramework/compare/5-r.4.1...5-r.5-beta.1
522539
[5-r.4.1]: https://github.com/Live2D/CubismNativeFramework/compare/5-r.4...5-r.4.1

NOTICE.ja.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44

55
# お知らせ
66

7-
## [制限事項] Cubism 5 SDK for Native R5 beta2 の動作環境について (2025-10-30 更新)
8-
9-
Cubism 5 SDK for Native R5 beta2 について、Vulkan環境は**ビルドができません**ので、あらかじめご了承ください。
10-
Vulkan環境は今後のアップデートにてCubism 5.3新機能も含め対応を予定しています。
11-
その他の環境については対応しております。
12-
13-
## [注意事項] Cubism 5 SDK for Native R5 beta2 Metal環境のパフォーマンスについて (2025-10-30)
14-
15-
Cubism 5 SDK for Native R5 beta2 Metal環境にてモデルを描画した際、iOS 26、iPadOS 26 及び macOS 26 環境においてパフォーマンスが劣化する場合がございます。
16-
本件はコマンドエンコーダー( `MTLRenderCommandEncoder` 及び `MTLBlitCommandEncoder` )のオーバーヘッドによるものと考えておりますが、
17-
今後のアップデートにてFrameworkの改修や、最新のMetalバージョンへ移行することも含めて調査し、対応を検討してまいります。
187

198
---
209

NOTICE.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44

55
# Notices
66

7-
## [Restrictions] Operating Environment for Cubism 5 SDK for Native R5 beta2 (Updated 2025-10-30)
8-
9-
Please be aware that the Cubism 5 SDK for Native R5 beta2 does not support builds in Vulkan environments.
10-
Support for Vulkan, including new features of Cubism 5.3, is planned for future updates.
11-
Other environments are supported.
12-
13-
## [Cautions] Performance of Cubism 5 SDK for Native R5 beta2 in Metal Environments (2025-10-30)
14-
15-
When rendering models in the Metal environment of Cubism 5 SDK for Native R5 beta2, performance may degrade in iOS 26, iPadOS 26, and macOS 26 environments.
16-
This issue is believed to be caused by overhead from the command encoders (`MTLRenderCommandEncoder` and `MTLBlitCommandEncoder`).
17-
We will investigate and consider addressing this issue in future updates, including modifications to the Framework and migration to the latest Metal version.
187

198
---
209

README.ja.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Live2D Cubism Editor で出力したモデルをアプリケーションで利
1515
本フレームワークを使用する前に、[ライセンス](LICENSE.md)をご確認ください。
1616

1717

18-
## Cubism 5新機能や過去バージョンとの互換性について
18+
## Cubism 5.3新機能や過去バージョンとの互換性について
1919

20-
本 SDK はCubism 5に対応した製品です
21-
Cubism 5 Editorに搭載された新機能のSDK対応については [こちら](https://docs.live2d.com/cubism-sdk-manual/cubism-5-new-functions/)をご確認ください。
22-
過去バージョンのCubism SDKとの互換性については [こちら](https://docs.live2d.com/cubism-sdk-manual/compatibility-with-cubism-5/)をご確認ください。
20+
本 SDK はCubism 5.3に対応した製品です
21+
Cubism 5.3 Editorに搭載された新機能のSDK対応については [こちら](https://docs.live2d.com/cubism-sdk-manual/cubism-5-3-new-functions/)をご確認ください。
22+
過去バージョンのCubism SDKとの互換性については [こちら](https://docs.live2d.com/cubism-sdk-manual/compatibility-with-cubism-5-3/)をご確認ください。
2323

2424

2525
## コンポーネント

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Comments of the source codes are being translated into English.
2020
Please [Go Here](./TRANSLATION.md) for the status.
2121

2222

23-
## Compatibility with Cubism 5 new features and previous Cubism SDK versions
23+
## Compatibility with Cubism 5.3 new features and previous Cubism SDK versions
2424

25-
This SDK is compatible with Cubism 5.
26-
For SDK compatibility with new features in Cubism 5 Editor, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/cubism-5-new-functions/).
27-
For compatibility with previous versions of Cubism SDK, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/compatibility-with-cubism-5/).
25+
This SDK is compatible with Cubism 5.3.
26+
For SDK compatibility with new features in Cubism 5.3 Editor, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/cubism-5-3-new-functions/).
27+
For compatibility with previous versions of Cubism SDK, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/compatibility-with-cubism-5-3/).
2828

2929

3030
## Components

src/CubismFramework.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CubismAllocationAlignedTag
4444
{ };
4545

4646
static CubismAllocationTag GlobalTag;
47-
static CubismAllocationAlignedTag GloabalAlignedTag;
47+
static CubismAllocationAlignedTag GlobalAlignedTag;
4848

4949
}}}
5050

@@ -107,9 +107,9 @@ void CsmDelete(T* address)
107107
#define CSM_DELETE_SELF(type, obj) do { if (!obj){ break; } obj->~type(); operator delete(obj, Live2D::Cubism::Framework::GlobalTag); } while(0)
108108
#define CSM_DELETE(obj) CsmDelete(obj)
109109
#define CSM_MALLOC(size) Live2D::Cubism::Framework::CubismFramework::Allocate(size)
110-
#define CSM_MALLOC_ALLIGNED(size, align) Live2D::Cubism::Framework::CubismFramework::AllocateAligned(size, align)
110+
#define CSM_MALLOC_ALIGNED(size, align) Live2D::Cubism::Framework::CubismFramework::AllocateAligned(size, align)
111111
#define CSM_FREE(ptr) Live2D::Cubism::Framework::CubismFramework::Deallocate(ptr)
112-
#define CSM_FREE_ALLIGNED(ptr) Live2D::Cubism::Framework::CubismFramework::DeallocateAligned(ptr)
112+
#define CSM_FREE_ALIGNED(ptr) Live2D::Cubism::Framework::CubismFramework::DeallocateAligned(ptr)
113113

114114
#endif
115115

src/Model/CubismMoc.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CubismMoc* CubismMoc::Create(const csmByte* mocBytes, csmSizeInt size, csmBool s
1414
{
1515
CubismMoc* cubismMoc = NULL;
1616

17-
void* alignedBuffer = CSM_MALLOC_ALLIGNED(size, Core::csmAlignofMoc);
17+
void* alignedBuffer = CSM_MALLOC_ALIGNED(size, Core::csmAlignofMoc);
1818
memcpy(alignedBuffer, mocBytes, size);
1919

2020
if (shouldCheckMocConsistency)
@@ -23,7 +23,7 @@ CubismMoc* CubismMoc::Create(const csmByte* mocBytes, csmSizeInt size, csmBool s
2323
csmBool consistency = HasMocConsistency(alignedBuffer, size);
2424
if (!consistency)
2525
{
26-
CSM_FREE_ALLIGNED(alignedBuffer);
26+
CSM_FREE_ALIGNED(alignedBuffer);
2727

2828
// 整合性が確認できなければ処理しない
2929
CubismLogError("Inconsistent MOC3.");
@@ -58,14 +58,14 @@ CubismMoc::~CubismMoc()
5858
{
5959
CSM_ASSERT(_modelCount == 0);
6060

61-
CSM_FREE_ALLIGNED(_moc);
61+
CSM_FREE_ALIGNED(_moc);
6262
}
6363

6464
CubismModel* CubismMoc::CreateModel()
6565
{
6666
CubismModel* cubismModel = NULL;
6767
const csmUint32 modelSize = Core::csmGetSizeofModel(_moc);
68-
void* modelMemory = CSM_MALLOC_ALLIGNED(modelSize, Core::csmAlignofModel);
68+
void* modelMemory = CSM_MALLOC_ALIGNED(modelSize, Core::csmAlignofModel);
6969

7070
Core::csmModel* model = Core::csmInitializeModelInPlace(_moc, modelMemory, modelSize);
7171

@@ -103,15 +103,15 @@ Core::csmMocVersion CubismMoc::GetMocVersionFromBuffer(const csmByte* mocBytes,
103103
CubismLogError("Invalid mocBytes or size.");
104104
return 0;
105105
}
106-
void* alignedBuffer = CSM_MALLOC_ALLIGNED(size, Core::csmAlignofMoc);
106+
void* alignedBuffer = CSM_MALLOC_ALIGNED(size, Core::csmAlignofMoc);
107107
if (alignedBuffer == nullptr)
108108
{
109109
CubismLogError("Failed to allocate aligned memory.");
110110
return 0;
111111
}
112112
memcpy(alignedBuffer, mocBytes, size);
113113
const Core::csmMocVersion version = Core::csmGetMocVersion(alignedBuffer, size);
114-
CSM_FREE_ALLIGNED(alignedBuffer);
114+
CSM_FREE_ALIGNED(alignedBuffer);
115115
return version;
116116
}
117117

@@ -123,12 +123,12 @@ csmBool CubismMoc::HasMocConsistency(void* address, const csmUint32 size)
123123

124124
csmBool CubismMoc::HasMocConsistencyFromUnrevivedMoc(const csmByte* mocBytes, csmSizeInt size)
125125
{
126-
void* alignedBuffer = CSM_MALLOC_ALLIGNED(size, Core::csmAlignofMoc);
126+
void* alignedBuffer = CSM_MALLOC_ALIGNED(size, Core::csmAlignofMoc);
127127
memcpy(alignedBuffer, mocBytes, size);
128128

129129
csmBool consistency = CubismMoc::HasMocConsistency(alignedBuffer, size);
130130

131-
CSM_FREE_ALLIGNED(alignedBuffer);
131+
CSM_FREE_ALIGNED(alignedBuffer);
132132

133133
return consistency;
134134
}

src/Model/CubismModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CubismModel::CubismModel(Core::csmModel* model)
3434

3535
CubismModel::~CubismModel()
3636
{
37-
CSM_FREE_ALLIGNED(_model);
37+
CSM_FREE_ALIGNED(_model);
3838
}
3939

4040
csmFloat32 CubismModel::GetParameterValue(CubismIdHandle parameterId)

src/Model/CubismModel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class CubismModel
312312
* Constructor.
313313
*
314314
* @param objectIndex index of the object
315-
* @param type type of the object (Drawable, Parts, or Alias)
315+
* @param type type of the object (Drawable or Parts)
316316
*/
317317
CubismModelObjectInfo(csmUint32 objectIndex, ObjectType type)
318318
: ObjectIndex(objectIndex)
@@ -327,7 +327,7 @@ class CubismModel
327327
{
328328
}
329329

330-
ObjectType ObjectType; ///< Type of the object (Drawable, Parts, or Alias)
330+
ObjectType ObjectType; ///< Type of the object (Drawable or Parts)
331331
csmUint32 ObjectIndex; ///< Index of the object
332332
};
333333

src/Rendering/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ target_sources(${LIB_NAME}
66
${CMAKE_CURRENT_SOURCE_DIR}/CubismClippingManager.tpp
77
${CMAKE_CURRENT_SOURCE_DIR}/CubismRenderer.cpp
88
${CMAKE_CURRENT_SOURCE_DIR}/CubismRenderer.hpp
9-
${CMAKE_CURRENT_SOURCE_DIR}/CubismRenderTarget.hpp
9+
${CMAKE_CURRENT_SOURCE_DIR}/ICubismOffscreenManager.hpp
10+
${CMAKE_CURRENT_SOURCE_DIR}/ICubismOffscreenRenderTarget.hpp
1011
)
1112

1213
# Add specified rendering directory.

0 commit comments

Comments
 (0)