diff --git a/.gitignore b/.gitignore index f38c2d9..bd6bc66 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ build/ *.iml .DS_Store +CMakeCache.txt +CMakeFiles diff --git a/src/Effect/CubismPose.cpp b/src/Effect/CubismPose.cpp index fcb8882..c861182 100644 --- a/src/Effect/CubismPose.cpp +++ b/src/Effect/CubismPose.cpp @@ -32,9 +32,8 @@ CubismPose::PartData::~PartData() CubismPose::PartData::PartData(const PartData& v) : ParameterIndex(0) , PartIndex(0) + , PartId(v.PartId) { - PartId = v.PartId; - for (csmVector::const_iterator ite = v.Link.Begin(); ite != v.Link.End(); ++ite) { Link.PushBack(*ite); diff --git a/src/Id/CubismId.cpp b/src/Id/CubismId.cpp index f8088ac..b6b6265 100644 --- a/src/Id/CubismId.cpp +++ b/src/Id/CubismId.cpp @@ -18,9 +18,8 @@ CubismId::CubismId(const CubismId& c) { } CubismId::CubismId(const csmChar* id) -{ - _id = id; -} + : _id(id) +{ } CubismId::~CubismId() { } diff --git a/src/Math/CubismModelMatrix.cpp b/src/Math/CubismModelMatrix.cpp index b437312..5b1433f 100644 --- a/src/Math/CubismModelMatrix.cpp +++ b/src/Math/CubismModelMatrix.cpp @@ -16,10 +16,9 @@ CubismModelMatrix::CubismModelMatrix() { } CubismModelMatrix::CubismModelMatrix(csmFloat32 w, csmFloat32 h) + : _width(w) + , _height(h) { - _width = w; - _height = h; - SetHeight(2.0f); } diff --git a/src/Motion/CubismMotionQueueManager.cpp b/src/Motion/CubismMotionQueueManager.cpp index 3db6cf0..7801610 100644 --- a/src/Motion/CubismMotionQueueManager.cpp +++ b/src/Motion/CubismMotionQueueManager.cpp @@ -229,7 +229,7 @@ csmBool CubismMotionQueueManager::IsFinished(CubismMotionQueueEntryHandle motion { // 既にモーションがあれば終了フラグを立てる - for (csmVector::iterator ite = _motions.Begin(); ite != _motions.End(); ite++) + for (csmVector::iterator ite = _motions.Begin(); ite != _motions.End(); ++ite) { CubismMotionQueueEntry* motionQueueEntry = *ite; diff --git a/src/Physics/CubismPhysics.cpp b/src/Physics/CubismPhysics.cpp index 5cb4424..0fa446a 100644 --- a/src/Physics/CubismPhysics.cpp +++ b/src/Physics/CubismPhysics.cpp @@ -442,13 +442,13 @@ void UpdateOutputParameterValue(csmFloat32* parameterValue, csmFloat32 parameter CubismPhysics::CubismPhysics() : _physicsRig(NULL) + , _currentRemainTime(0.0f) { // set default options. _options.Gravity.Y = -1.0f; _options.Gravity.X = 0; _options.Wind.X = 0; _options.Wind.Y = 0; - _currentRemainTime = 0.0f; } CubismPhysics::~CubismPhysics() diff --git a/src/Rendering/CubismRenderer.cpp b/src/Rendering/CubismRenderer.cpp index bf89a77..201060f 100644 --- a/src/Rendering/CubismRenderer.cpp +++ b/src/Rendering/CubismRenderer.cpp @@ -157,20 +157,13 @@ csmBool CubismRenderer::IsUsingHighPrecisionMask() * CubismClippingContext ********************************************************************************************************************/ CubismClippingContext::CubismClippingContext(const csmInt32* clippingDrawableIndices, csmInt32 clipCount) -{ - // クリップしている(=マスク用の)Drawableのインデックスリスト - _clippingIdList = clippingDrawableIndices; - - // マスクの数 - _clippingIdCount = clipCount; - - _layoutChannelIndex = 0; - - _allClippedDrawRect = CSM_NEW csmRectF(); - _layoutBounds = CSM_NEW csmRectF(); - - _clippedDrawableIndexList = CSM_NEW csmVector(); -} + : _clippingIdList(clippingDrawableIndices) + , _clippingIdCount(clipCount) + , _layoutChannelIndex(0) + , _allClippedDrawRect(CSM_NEW csmRectF()) + , _layoutBounds(CSM_NEW csmRectF()) + , _clippedDrawableIndexList(CSM_NEW csmVector()) +{ } CubismClippingContext::~CubismClippingContext() { diff --git a/src/Rendering/D3D11/CubismRenderer_D3D11.cpp b/src/Rendering/D3D11/CubismRenderer_D3D11.cpp index 420b25a..f9924c6 100644 --- a/src/Rendering/D3D11/CubismRenderer_D3D11.cpp +++ b/src/Rendering/D3D11/CubismRenderer_D3D11.cpp @@ -305,10 +305,9 @@ CubismRenderer_D3D11::CubismRenderer_D3D11() , _clippingManager(NULL) , _clippingContextBufferForMask(NULL) , _clippingContextBufferForDraw(NULL) + , _commandBufferNum(0) + , _commandBufferCurrent(0) { - _commandBufferNum = 0; - _commandBufferCurrent = 0; - // テクスチャ対応マップの容量を確保しておく. _textures.PrepareCapacity(32, true); } diff --git a/src/Rendering/D3D9/CubismRenderer_D3D9.cpp b/src/Rendering/D3D9/CubismRenderer_D3D9.cpp index 9b8f055..2c9a19d 100644 --- a/src/Rendering/D3D9/CubismRenderer_D3D9.cpp +++ b/src/Rendering/D3D9/CubismRenderer_D3D9.cpp @@ -294,10 +294,9 @@ CubismRenderer_D3D9::CubismRenderer_D3D9() , _clippingManager(NULL) , _clippingContextBufferForMask(NULL) , _clippingContextBufferForDraw(NULL) + , _commandBufferNum(0) + , _commandBufferCurrent(0) { - _commandBufferNum = 0; - _commandBufferCurrent = 0; - // テクスチャ対応マップの容量を確保しておく. _textures.PrepareCapacity(32, true); } diff --git a/src/Rendering/Vulkan/CubismClass_Vulkan.cpp b/src/Rendering/Vulkan/CubismClass_Vulkan.cpp index 336d00d..0c4d3b2 100644 --- a/src/Rendering/Vulkan/CubismClass_Vulkan.cpp +++ b/src/Rendering/Vulkan/CubismClass_Vulkan.cpp @@ -272,7 +272,6 @@ void CubismImageVulkan::SetImageLayout(VkCommandBuffer commandBuffer, VkImageLay case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL: barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT; - destinationStage = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; destinationStage = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR; break; diff --git a/src/Rendering/Vulkan/CubismRenderer_Vulkan.cpp b/src/Rendering/Vulkan/CubismRenderer_Vulkan.cpp index 8e0e6d1..fd4c64b 100644 --- a/src/Rendering/Vulkan/CubismRenderer_Vulkan.cpp +++ b/src/Rendering/Vulkan/CubismRenderer_Vulkan.cpp @@ -258,7 +258,7 @@ VkShaderModule CubismPipeline_Vulkan::PipelineResource::CreateShaderModule(VkDev return shaderModule; } -void CubismPipeline_Vulkan::PipelineResource::CreateGraphicsPipeline(std::string vertFileName, std::string fragFileName, +void CubismPipeline_Vulkan::PipelineResource::CreateGraphicsPipeline(const std::string vertFileName, const std::string fragFileName, VkDescriptorSetLayout descriptorSetLayout) { VkShaderModule vertShaderModule = CreateShaderModule(s_device, vertFileName);