ECS/Project/Project/Renderers/RendererResourceManagers/RendererShaderManager/RendererShaderManager.cpp
//	Return the Shader Geometry Description Requirement Representation.
Return the Shader Geometry Description Requirement Representation.
Return the Shader Geometry Description Requirement Representation .
int RendererShaderManager::getGeometryVertexRequirementsForShader(const std::string & requestedShader) const
{
	auto shaderIterator = mapNameToShaderData.find(activeShaderName);
	if (shaderIterator != mapNameToShaderData.end())
	{
		int shaderGeometryDescriptionRepresentation = 0;
		auto shaderPropertiesIterator = shaderIterator->second->shaderProperties.find("Require Vertex Basic Data");
		if (shaderPropertiesIterator != shaderIterator->second->shaderProperties.end())
		{
			if (shaderPropertiesIterator->second == "True")
			{
				shaderGeometryDescriptionRepresentation = shaderGeometryDescriptionRepresentation | 1;
			}
		}
		shaderPropertiesIterator = shaderIterator->second->shaderProperties.find("Require Vertex Tangent Bitangent Data");
		if (shaderPropertiesIterator != shaderIterator->second->shaderProperties.end())
		{
			if (shaderPropertiesIterator->second == "True")
			{
				shaderGeometryDescriptionRepresentation = shaderGeometryDescriptionRepresentation | 2;
			}
		}
		shaderPropertiesIterator = shaderIterator->second->shaderProperties.find("Require Vertex Texture Coordinates Data");
		if (shaderPropertiesIterator != shaderIterator->second->shaderProperties.end())
		{
			if (shaderPropertiesIterator->second == "True")
			{
				shaderGeometryDescriptionRepresentation = shaderGeometryDescriptionRepresentation | 4;
			}
		}
		return shaderGeometryDescriptionRepresentation;
	}
	else
	{
		TO DO
		Throw Exception if Shader is Not Found.
		return 0;
	}
}
int RendererShaderManager :: getGeometryVertexRequirementsForShader ( const std :: string & requestedShader ) const { auto shaderIterator = mapNameToShaderData . find ( activeShaderName ) ; if ( shaderIterator != mapNameToShaderData . end ( ) ) { int shaderGeometryDescriptionRepresentation = 0 ; auto shaderPropertiesIterator = shaderIterator -> second -> shaderProperties . find ( " " ) ; if ( shaderPropertiesIterator != shaderIterator -> second -> shaderProperties . end ( ) ) { if ( shaderPropertiesIterator -> second == " " ) { shaderGeometryDescriptionRepresentation = shaderGeometryDescriptionRepresentation | 1 ; } } shaderPropertiesIterator = shaderIterator -> second -> shaderProperties . find ( " " ) ; if ( shaderPropertiesIterator != shaderIterator -> second -> shaderProperties . end ( ) ) { if ( shaderPropertiesIterator -> second == " " ) { shaderGeometryDescriptionRepresentation = shaderGeometryDescriptionRepresentation | 2 ; } } shaderPropertiesIterator = shaderIterator -> second -> shaderProperties . find ( " " ) ; if ( shaderPropertiesIterator != shaderIterator -> second -> shaderProperties . end ( ) ) { if ( shaderPropertiesIterator -> second == " " ) { shaderGeometryDescriptionRepresentation = shaderGeometryDescriptionRepresentation | 4 ; } } return shaderGeometryDescriptionRepresentation ; } else { return 0 ; } }
Return the Shader Geometry Description Requirement Representation.
Return the Shader Geometry Description Requirement Representation .
//	Find the shader. //	Check if the Shader exists. //	Find the types of Geometry Data that the Shader Requires. Check for Vertex Basic Data. //	Find the types of Geometry Data that the Shader Requires. Check for Vertex Tandgent and Bitangent Data. //	Find the types of Geometry Data that the Shader Requires. Check for Vertex Texture Coordinates. //	 //	TO DO //	Throw Exception if Shader is Not Found.