示例#1
0
		bool ShaderManager::loadPipeline(const FileHandle &fileHandle, const char *id, vx::StackAllocator* scratchAllocator, std::string* error)
		{
			auto pipelineDir = m_dataDir + "shaders/";
			const std::string programDir(m_dataDir + "shaders/programs/");
			const std::string includeDir = m_dataDir + "shaders/include/";

			return loadPipeline(fileHandle, id, pipelineDir, programDir, includeDir, scratchAllocator, error);
		}
示例#2
0
	void D3D12Render::v_init()
	{
		m_viewport.Width = getClientWidth();
		m_viewport.Height = getClientHeight();
		m_viewport.MaxDepth = 1.0f;

		m_scissorRect.right = static_cast<LONG>(getClientWidth());
		m_scissorRect.bottom = static_cast<LONG>(getClientHeight());

		loadPipeline();
		m_triangle.init(m_pD3D12Device);
		loadAssets();


	}
示例#3
0
bool CResourceLoader::loadPipelinesFromFile(const std::string& name)
{
	
	std::string fullpath;
	if (!mResourceGroupManager->getFullPath(name, fullpath))
	{
		GF_PRINT_CONSOLE_INFO("The pipeline named %s doesn't exist.\n", name);
		return false;
	}

	std::vector<IResourceXmlParser::SPipelineCreateParams> createParamsArray;
	if (!mResourceXmlParser->parsePipelineFile(fullpath, createParamsArray))
		return false;
	
	for (u32 i = 0; i < createParamsArray.size(); i++)
	{
		loadPipeline(fullpath, createParamsArray[i]);
	}

	return true;
}
示例#4
0
void onInit(HWND hWnd)
{
	loadPipeline(hWnd);
	loadAssets();
}