GameKit  0.0.1a
C++ gamedev tools
RenderStates.hpp
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: RenderStates.hpp
5  *
6  * Description:
7  *
8  * Created: 14/06/2018 19:52:27
9  *
10  * Author: Quentin Bazin, <quent42340@gmail.com>
11  *
12  * =====================================================================================
13  */
14 #ifndef GK_RENDERSTATES_HPP_
15 #define GK_RENDERSTATES_HPP_
16 
17 #include <glm/matrix.hpp>
18 
19 #include "gk/core/IntTypes.hpp"
20 #include "gk/gl/Transform.hpp"
21 
22 namespace gk {
23 
24 class Shader;
25 class Texture;
26 
27 namespace VertexAttribute {
28  enum {
29  Coord3d = 1,
30  Normal = 2,
31  TexCoord = 4,
32  Color = 8,
33  LightValue = 16,
34  BlockType = 32,
36 
38  All = 0xff,
39  };
40 }
41 
42 struct RenderStates {
46 
47  const Texture *texture = nullptr;
48  const Shader *shader = nullptr;
49 
50  u8 vertexAttributes = VertexAttribute::All;
51 
52  static const RenderStates Default; // Defined in RenderTarget.cpp
53 };
54 
55 } // namespace gk
56 
57 #endif // GK_RENDERSTATES_HPP_
Transform projectionMatrix
Utility class for manipulating RGBA colors.
Definition: Color.hpp:25
unsigned char u8
Definition: IntTypes.hpp:21
Transform transform
Image living on the graphics card that can be used for drawing.
Definition: Texture.hpp:30
static const RenderStates Default
Transform viewMatrix