RenderStates.hpp
1 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2014 Laurent Gomila (laurent.gom@gmail.com)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24 
25 #ifndef CPP3DS_RENDERSTATES_HPP
26 #define CPP3DS_RENDERSTATES_HPP
27 
29 // Headers
31 #include <cpp3ds/Graphics/BlendMode.hpp>
32 #include <cpp3ds/Graphics/Transform.hpp>
33 
34 
35 namespace cpp3ds
36 {
37 class Shader;
38 class Texture;
39 
45 {
46 public :
47 
60  RenderStates();
61 
68  RenderStates(const BlendMode& theBlendMode);
69 
76  RenderStates(const Transform& theTransform);
77 
84  RenderStates(const Texture* theTexture);
85 
92  RenderStates(const Shader* theShader);
93 
103  RenderStates(const BlendMode& theBlendMode, const Transform& theTransform,
104  const Texture* theTexture, const Shader* theShader);
105 
107  // Static member data
109  static const RenderStates Default;
110 
112  // Member data
116  const Texture* texture;
117  const Shader* shader;
118 };
119 
120 }
121 
122 
123 #endif
124 
125 
BlendMode blendMode
Blending mode.
Shader class (vertex and fragment)
Definition: Shader.hpp:53
Blending modes for drawing.
Definition: BlendMode.hpp:36
RenderStates()
Default constructor.
Transform transform
Transform.
static const RenderStates Default
Special instance holding the default render states.
const Texture * texture
Texture.
Define the states used for drawing to a RenderTarget.
Define a 3x3 transform matrix.
Definition: Transform.hpp:41
some things could easily be broken///////
Definition: Texture.hpp:47
const Shader * shader
Shader.