Now mostly working with GUECS but shaders are still busted. Have to find out why they stopped working.
This commit is contained in:
parent
a5f6a82611
commit
ac22a11c9f
27 changed files with 162 additions and 1210 deletions
10
shaders.cpp
10
shaders.cpp
|
@ -1,8 +1,8 @@
|
|||
#include "shaders.hpp"
|
||||
#include <SFML/Graphics/Image.hpp>
|
||||
#include "guecs/sfml/shaders.hpp"
|
||||
#include "guecs/sfml/config.hpp"
|
||||
#include "dbc.hpp"
|
||||
#include <SFML/Graphics/Image.hpp>
|
||||
#include <fmt/core.h>
|
||||
#include "config.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace shaders {
|
||||
|
@ -18,10 +18,8 @@ namespace shaders {
|
|||
|
||||
bool load_shader(std::string name, nlohmann::json& settings) {
|
||||
std::string file_name = settings["file_name"];
|
||||
|
||||
auto ptr = std::make_shared<sf::Shader>();
|
||||
bool good = ptr->loadFromFile(Config::path_to(file_name),
|
||||
sf::Shader::Type::Fragment);
|
||||
bool good = ptr->loadFromFile(file_name, sf::Shader::Type::Fragment);
|
||||
|
||||
if(good) {
|
||||
configure_shader_defaults(ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue