From 83c61036966c4c358a094cabe27c8de60082200d Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Sat, 20 Nov 2021 00:29:28 +0500 Subject: Removed every reference to OpenGL except GalOgl.cpp --- src/AssetManager.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/AssetManager.cpp') diff --git a/src/AssetManager.cpp b/src/AssetManager.cpp index 1a7e523..0976e30 100644 --- a/src/AssetManager.cpp +++ b/src/AssetManager.cpp @@ -392,34 +392,7 @@ void ParseAssetBlockState(AssetTreeNode &node) { } void ParseAssetShader(AssetTreeNode &node) { - try { - nlohmann::json j = nlohmann::json::parse(node.data); - std::string vertPath = j["vert"].get(); - std::string fragPath = j["frag"].get(); - - AssetTreeNode* vertAsset = AssetManager::GetAssetByAssetName(vertPath); - AssetTreeNode* fragAsset = AssetManager::GetAssetByAssetName(fragPath); - std::string vertSource((char*)vertAsset->data.data(), (char*)vertAsset->data.data() + vertAsset->data.size()); - std::string fragSource((char*)fragAsset->data.data(), (char*)fragAsset->data.data() + fragAsset->data.size()); - - std::vector uniforms; - - for (auto& it : j["uniforms"]) { - uniforms.push_back(it.get()); - } - - node.asset = std::make_unique(); - AssetShader* asset = dynamic_cast(node.asset.get()); - asset->shader = std::make_unique(vertSource, fragSource, uniforms); - } catch (std::exception &e) { - glCheckError(); - LOG(ERROR) << "Shader asset parsing failed: " << e.what(); - } catch (...) { - glCheckError(); - LOG(ERROR) << "Shader asset parsing failed with unknown reason"; - return; - } } void ParseAssetScript(AssetTreeNode &node) { -- cgit v1.2.3