<commit_before>#pragma once

#include <ShaderManager.h>

namespace Rendering
{
	namespace Shader
	{
		class Factory
		{
		private:
			Rendering::Shader::ShaderManager	*_shaderMgr;

		public:
			Factory(Rendering::Shader::ShaderManager*& shaderManager)
			{
				_shaderMgr = shaderManager;
			}

			~Factory(void)
			{
			}

		public:
			bool LoadShader(const std::string& shaderName,
				const std::string& mainVSFuncName, const std::string& mainPSFuncName,
				Rendering::Shader::VertexShader*& outVertexShader,
				Rendering::Shader::PixelShader*& outPixelShader)
			{
				std::string folderPath = "";
				std::vector<D3D11_INPUT_ELEMENT_DESC> vertexDeclations;
				D3D11_INPUT_ELEMENT_DESC desc;
				unsigned int vsFlag = 0;

				typedef unsigned int uint;
				auto AddInputElementDesc = [&](const std::string& semanticName, uint semanticIndex, DXGI_FORMAT format, uint alignedByteOffset, D3D11_INPUT_CLASSIFICATION inputSlotClass, uint inputSlot, uint instanceDataStepRate)
				{
					auto MakeInputElementDesc = [&](D3D11_INPUT_ELEMENT_DESC& out)
					{
						out.SemanticName = semanticName.c_str();
						out.SemanticIndex = semanticIndex;
						out.AlignedByteOffset = alignedByteOffset;
						out.Format = format;
						out.InputSlotClass = inputSlotClass;
						out.InputSlot = inputSlot;
						out.InstanceDataStepRate = instanceDataStepRate;
					};

					D3D11_INPUT_ELEMENT_DESC desc;
					MakeInputElementDesc(desc);
					vertexDeclations.push_back(desc);

					if(semanticName == "POSITION")
						vsFlag |= Shader::VertexShader::Flag::POSITION;
					else if(semanticName == "NORMAL")
						vsFlag |= Shader::VertexShader::Flag::NORMAL;
					else if(semanticName == "BINORMAL")
						vsFlag |= Shader::VertexShader::Flag::BINORMAL;
					else if(semanticName == "TANGENT")
						vsFlag |= Shader::VertexShader::Flag::TANGENT;
					else if(semanticName == "TEXCOORD")
						vsFlag |= (Shader::VertexShader::Flag::TEXCOORD0 << semanticIndex);
					//else if(semanticName.find("INSTANCE") != -1)
					//{
					//	// ó
					//}
				};<commit_msg>팩토리 태그 코드 수정 re #28<commit_after>#pragma once

#include <ShaderManager.h>

namespace Rendering
{
	namespace Shader
	{
		class Factory
		{
		private:
			Rendering::Shader::ShaderManager	*_shaderMgr;

		public:
			Factory(Rendering::Shader::ShaderManager*& shaderManager)
			{
				_shaderMgr = shaderManager;
			}

			~Factory(void)
			{
			}

		public:
			bool LoadShader(const std::string& shaderName,
				const std::string& mainVSFuncName, const std::string& mainPSFuncName,
				Rendering::Shader::VertexShader*& outVertexShader,
				Rendering::Shader::PixelShader*& outPixelShader)
			{
				std::string folderPath = "";
				std::vector<D3D11_INPUT_ELEMENT_DESC> vertexDeclations;
				D3D11_INPUT_ELEMENT_DESC desc;
				std::vector<std::string> vsTags;

				typedef unsigned int uint;
				auto AddInputElementDesc = [&](const std::string& semanticName, uint semanticIndex, DXGI_FORMAT format, uint alignedByteOffset, D3D11_INPUT_CLASSIFICATION inputSlotClass, uint inputSlot, uint instanceDataStepRate)
				{
					auto MakeInputElementDesc = [&](D3D11_INPUT_ELEMENT_DESC& out)
					{
						out.SemanticName = semanticName.c_str();
						out.SemanticIndex = semanticIndex;
						out.AlignedByteOffset = alignedByteOffset;
						out.Format = format;
						out.InputSlotClass = inputSlotClass;
						out.InputSlot = inputSlot;
						out.InstanceDataStepRate = instanceDataStepRate;
					};

					D3D11_INPUT_ELEMENT_DESC desc;
					MakeInputElementDesc(desc);
					vertexDeclations.push_back(desc);

					vsTags.push_back(semanticName);
				};
{'fraction_non_alphanumeric': 0.10867148415786548, 'fraction_numerical': 0.009727626459143969, 'mean_word_length': 4.012534818941504, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6603569', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1157, 'n_words': 207}