NasNas
An intuitive and beginner friendly 2D game framework for C++
include
NasNas
core
data
ShaderHolder.hpp
1
5
#pragma once
6
7
#include <SFML/Graphics/Shader.hpp>
8
9
namespace
ns
{
10
11
class
ShaderHolder
{
12
public
:
18
void
setShader
(sf::Shader* shader);
19
24
auto
getShader
()
const
-> sf::Shader*;
25
29
void
toggleShader
();
30
36
void
clearShader
();
37
38
private
:
39
sf::Shader* m_shader =
nullptr
;
40
sf::Shader* m_saved_shared =
nullptr
;
41
};
42
43
}
ns::ShaderHolder::setShader
void setShader(sf::Shader *shader)
Set the shader to be applied when rendering.
ns::ShaderHolder::getShader
auto getShader() const -> sf::Shader *
Get the current Shader.
ns::ShaderHolder
Definition:
ShaderHolder.hpp:11
ns::ShaderHolder::clearShader
void clearShader()
Remove the shader.
ns
ns::ShaderHolder::toggleShader
void toggleShader()
Toggle shader.
Generated by
1.8.13