Skip to content

C++ doesn't like shaders stores in objects #19

@MetalPizzaCat

Description

@MetalPizzaCat

Shaders should be stored outside of the object that will use them

e.g. of creating error
class ActorBased:CActor { public: sf::Shader shaderName; }
but this does not

sf::Shader testShader; testShader.loadFromFile(pathVert", pathFrag); testShader.setUniform("texture", this->m_sprite.getTexture()); window.draw(m_sprite, &testShader);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededinvalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions