diff -pruN --exclude build ./demo_clean/CMakeLists.txt ./demo_dev/CMakeLists.txt
---- ./demo_clean/CMakeLists.txt 2021-02-17 01:23:17.000000000 +0000
-+++ ./demo_dev/CMakeLists.txt 2021-06-12 17:14:36.877121318 +0100
+--- ./demo_clean/CMakeLists.txt 2022-01-02 01:49:06.929909588 +0000
++++ ./demo_dev/CMakeLists.txt 2022-01-02 01:49:31.334289944 +0000
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
# Set app name.
set(APP_NAME Demo)
# Set directory paths.
-set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
-+set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-4-r.3)
++set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-4-r.4)
set(CORE_PATH ${SDK_ROOT_PATH}/Core)
set(FRAMEWORK_PATH ${SDK_ROOT_PATH}/Framework)
set(THIRD_PARTY_PATH ${SDK_ROOT_PATH}/Samples/OpenGL/thirdParty)
# Copy resource directory to build directory.
add_custom_command(
diff -pruN --exclude build ./demo_clean/scripts/make_gcc ./demo_dev/scripts/make_gcc
---- ./demo_clean/scripts/make_gcc 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/scripts/make_gcc 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/scripts/make_gcc 2021-04-28 12:18:50.948333190 +0100
-@@ -10,4 +10,4 @@ BUILD_PATH=$SCRIPT_PATH/../build/make_gc
+@@ -5,41 +5,9 @@ set -ue
+ SCRIPT_PATH=$(cd $(dirname $0) && pwd)
+ CMAKE_PATH=$SCRIPT_PATH/..
+ BUILD_PATH=$SCRIPT_PATH/../build/make_gcc
+-MINIMUM_DEMO="OFF"
+-DATA=""
+-
+-if [ "$#" -ne 0 ]; then
+- DATA="$1"
+-fi
+-
+-while :
+-do
+-
+- if [ -z "$DATA" ]; then
+- echo "Choose which format you would like to create the demo."
+- echo "Full version : 1"
+- echo "Minimum version : 2"
+- read -p "Your Choice : " DATA
+- fi
+-
+- case "$DATA" in
+- "1" )
+- echo "Making Full Demo"
+- MINIMUM_DEMO="OFF"
+- break ;;
+- "2" )
+- echo "Making Minimum Demo"
+- MINIMUM_DEMO="ON"
+- break ;;
+- * )
+- echo "You need to enter a valid number."
+- DATA="" ;;
+- esac
+-done
+
+ # Run CMake.
cmake -S "$CMAKE_PATH" \
-B "$BUILD_PATH" \
- -D CMAKE_BUILD_TYPE=Release
+- -D CMAKE_BUILD_TYPE=Release \
+- -D CSM_MINIMUM_DEMO=$MINIMUM_DEMO
-cd "$BUILD_PATH" && make
++ -D CMAKE_BUILD_TYPE=Release
+cd "$BUILD_PATH" && make -j4
diff -pruN --exclude build ./demo_clean/src/CMakeLists.txt ./demo_dev/src/CMakeLists.txt
---- ./demo_clean/src/CMakeLists.txt 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/CMakeLists.txt 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/CMakeLists.txt 2021-04-28 12:21:56.795134807 +0100
-@@ -6,8 +6,6 @@ target_sources(${APP_NAME}
+@@ -1,49 +1,22 @@
+-if (CSM_MINIMUM_DEMO)
+- target_sources(${APP_NAME}
++target_sources(${APP_NAME}
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppAllocator.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppAllocator.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppDefine.cpp
${CMAKE_CURRENT_SOURCE_DIR}/LAppDefine.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppDelegate.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppDelegate.hpp
-- ${CMAKE_CURRENT_SOURCE_DIR}/LAppWavFileHandler.cpp
-- ${CMAKE_CURRENT_SOURCE_DIR}/LAppWavFileHandler.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppLive2DManager.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppLive2DManager.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppModel.cpp
-@@ -21,6 +19,4 @@ target_sources(${APP_NAME}
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppView.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LAppView.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppDelegate.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppDelegate.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppLive2DManager.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppLive2DManager.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppModel.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppModel.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppPal.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppPal.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppSprite.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppSprite.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppTextureManager.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/LAppTextureManager.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/mainMinimum.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/TouchManager.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/TouchManager.hpp
- )
+- ${CMAKE_CURRENT_SOURCE_DIR}/CubismUserModelExtend.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/CubismUserModelExtend.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/CubismSampleViewMatrix.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/CubismSampleViewMatrix.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/MouseActionManager.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/MouseActionManager.hpp
+- )
+-else ()
+- target_sources(${APP_NAME}
+- PRIVATE
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppAllocator.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppAllocator.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppDefine.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppDefine.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppDelegate.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppDelegate.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppWavFileHandler.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppWavFileHandler.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppLive2DManager.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppLive2DManager.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppModel.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppModel.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppPal.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppPal.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppSprite.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppSprite.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppTextureManager.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppTextureManager.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppView.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/LAppView.hpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/TouchManager.cpp
+- ${CMAKE_CURRENT_SOURCE_DIR}/TouchManager.hpp
+- )
+-endif ()
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppView.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/LAppView.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
++)
diff -pruN --exclude build ./demo_clean/src/LAppDefine.cpp ./demo_dev/src/LAppDefine.cpp
---- ./demo_clean/src/LAppDefine.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppDefine.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppDefine.cpp 2021-04-28 12:18:50.948333190 +0100
@@ -64,11 +64,11 @@ namespace LAppDefine {
const csmInt32 PriorityForce = 3;
// デフォルトのレンダーターゲットサイズ
const csmInt32 RenderTargetWidth = 1900;
diff -pruN --exclude build ./demo_clean/src/LAppDelegate.cpp ./demo_dev/src/LAppDelegate.cpp
---- ./demo_clean/src/LAppDelegate.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppDelegate.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppDelegate.cpp 2021-04-28 12:18:50.948333190 +0100
@@ -45,7 +45,8 @@ void LAppDelegate::ReleaseInstance()
s_instance = NULL;
if (_window == NULL)
{
if (DebugLogEnable)
-@@ -95,10 +102,6 @@ bool LAppDelegate::Initialize()
+@@ -95,16 +102,11 @@ bool LAppDelegate::Initialize()
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// ウィンドウサイズ記憶
int width, height;
glfwGetWindowSize(LAppDelegate::GetInstance()->GetWindow(), &width, &height);
-@@ -111,8 +114,6 @@ bool LAppDelegate::Initialize()
+ _windowWidth = width;
+ _windowHeight = height;
+- glViewport(0, 0, _windowWidth, _windowHeight);
+
+ //AppViewの初期化
+ _view->Initialize();
+@@ -112,8 +114,6 @@ bool LAppDelegate::Initialize()
// Cubism3の初期化
InitializeCubism();
//load model
LAppLive2DManager::GetInstance();
-@@ -214,49 +215,6 @@ void LAppDelegate::InitializeCubism()
+@@ -155,7 +155,6 @@ void LAppDelegate::Run()
+ _windowWidth = width;
+ _windowHeight = height;
+ }
+- glViewport(0, 0, _windowWidth, _windowHeight);
+
+ // 時間更新
+ LAppPal::UpdateTime();
+@@ -216,49 +215,6 @@ void LAppDelegate::InitializeCubism()
LAppPal::UpdateTime();
}
GLuint LAppDelegate::CreateShader()
{
//バーテックスシェーダのコンパイル
-@@ -299,29 +257,9 @@ GLuint LAppDelegate::CreateShader()
+@@ -301,29 +257,9 @@ GLuint LAppDelegate::CreateShader()
return programId;
}
Csm::csmVector<string> LAppDelegate::Split(const std::string& baseString, char delimiter)
diff -pruN --exclude build ./demo_clean/src/LAppDelegate.hpp ./demo_dev/src/LAppDelegate.hpp
---- ./demo_clean/src/LAppDelegate.hpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppDelegate.hpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppDelegate.hpp 2021-04-28 12:18:50.948333190 +0100
@@ -40,7 +40,8 @@ public:
/**
-
-};
diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.cpp ./demo_dev/src/LAppLive2DManager.cpp
---- ./demo_clean/src/LAppLive2DManager.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppLive2DManager.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppLive2DManager.cpp 2021-04-28 12:24:45.405646016 +0100
@@ -52,11 +52,11 @@ void LAppLive2DManager::ReleaseInstance(
}
void LAppLive2DManager::OnUpdate() const
-@@ -136,12 +116,15 @@ void LAppLive2DManager::OnUpdate() const
+@@ -127,21 +107,24 @@ void LAppLive2DManager::OnUpdate() const
+ int width, height;
+ glfwGetWindowSize(LAppDelegate::GetInstance()->GetWindow(), &width, &height);
+
++ CubismMatrix44 projection;
+ csmUint32 modelCount = _models.GetSize();
+ for (csmUint32 i = 0; i < modelCount; ++i)
+ {
+- CubismMatrix44 projection;
+ LAppModel* model = GetModel(i);
+ if (model->GetModel()->GetCanvasWidth() > 1.0f && width < height)
{
// 横に長いモデルを縦長ウィンドウに表示する際モデルの横サイズでscaleを算出する
model->GetModelMatrix()->SetWidth(2.0f);
+ _translateY = translateY;
+}
diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.hpp ./demo_dev/src/LAppLive2DManager.hpp
---- ./demo_clean/src/LAppLive2DManager.hpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppLive2DManager.hpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppLive2DManager.hpp 2021-04-28 12:18:50.948333190 +0100
@@ -6,12 +6,15 @@
*/
+ float _translateY;
};
diff -pruN --exclude build ./demo_clean/src/LAppModel.cpp ./demo_dev/src/LAppModel.cpp
---- ./demo_clean/src/LAppModel.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppModel.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppModel.cpp 2021-04-28 12:26:56.699586813 +0100
@@ -21,6 +21,10 @@
#include "LAppTextureManager.hpp"
+}
+
diff -pruN --exclude build ./demo_clean/src/LAppModel.hpp ./demo_dev/src/LAppModel.hpp
---- ./demo_clean/src/LAppModel.hpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppModel.hpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppModel.hpp 2021-04-28 12:27:55.836457680 +0100
@@ -13,7 +13,7 @@
#include <Type/csmRectF.hpp>
diff -pruN --exclude build ./demo_clean/src/LAppPal.cpp ./demo_dev/src/LAppPal.cpp
---- ./demo_clean/src/LAppPal.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppPal.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppPal.cpp 2021-04-28 12:18:50.952333251 +0100
@@ -6,6 +6,7 @@
*/
}
file.read(buf, size);
diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.cpp ./demo_dev/src/LAppTextureManager.cpp
---- ./demo_clean/src/LAppTextureManager.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppTextureManager.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppTextureManager.cpp 2021-04-28 12:18:50.952333251 +0100
@@ -96,6 +96,46 @@ LAppTextureManager::TextureInfo* LAppTex
{
for (Csm::csmUint32 i = 0; i < _textures.GetSize(); i++)
diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.hpp ./demo_dev/src/LAppTextureManager.hpp
---- ./demo_clean/src/LAppTextureManager.hpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppTextureManager.hpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppTextureManager.hpp 2021-04-28 12:18:50.952333251 +0100
@@ -72,6 +72,8 @@ public:
*/
* @brief 画像の解放
*
diff -pruN --exclude build ./demo_clean/src/LAppView.cpp ./demo_dev/src/LAppView.cpp
---- ./demo_clean/src/LAppView.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppView.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppView.cpp 2021-04-28 12:18:50.952333251 +0100
@@ -13,7 +13,6 @@
#include "LAppLive2DManager.hpp"
- }
}
diff -pruN --exclude build ./demo_clean/src/LAppView.hpp ./demo_dev/src/LAppView.hpp
---- ./demo_clean/src/LAppView.hpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/LAppView.hpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/LAppView.hpp 2021-04-28 12:18:50.952333251 +0100
@@ -14,7 +14,6 @@
#include "CubismFramework.hpp"
// レンダリング先を別ターゲットにする方式の場合に使用
LAppSprite* _renderSprite; ///< モードによっては_renderBufferのテクスチャを描画
diff -pruN --exclude build ./demo_clean/src/main.cpp ./demo_dev/src/main.cpp
---- ./demo_clean/src/main.cpp 2021-02-17 01:23:17.000000000 +0000
+--- ./demo_clean/src/main.cpp 2022-01-02 01:49:06.929909588 +0000
+++ ./demo_dev/src/main.cpp 2021-04-28 12:28:55.845339613 +0100
@@ -5,18 +5,188 @@
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.