GameKit
0.0.1a
C++ gamedev tools
include
gk
gl
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,
35
AmbientOcclusion
= 64,
36
37
Only2d
=
Coord3d
|
TexCoord
|
Color
,
38
All
= 0xff,
39
};
40
}
41
42
struct
RenderStates
{
43
Transform
projectionMatrix
;
44
Transform
viewMatrix
;
45
Transform
transform
;
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_
gk::VertexAttribute::Color
Definition:
RenderStates.hpp:32
gk::VertexAttribute::Coord3d
Definition:
RenderStates.hpp:29
gk::RenderStates::projectionMatrix
Transform projectionMatrix
Definition:
RenderStates.hpp:43
gk
Definition:
AudioPlayer.hpp:21
gk::RenderStates
Definition:
RenderStates.hpp:42
gk::Color
Utility class for manipulating RGBA colors.
Definition:
Color.hpp:25
u8
unsigned char u8
Definition:
IntTypes.hpp:21
gk::VertexAttribute::Normal
Definition:
RenderStates.hpp:30
gk::RenderStates::transform
Transform transform
Definition:
RenderStates.hpp:45
gk::Texture
Image living on the graphics card that can be used for drawing.
Definition:
Texture.hpp:30
gk::VertexAttribute::BlockType
Definition:
RenderStates.hpp:34
gk::Transform
Definition:
Transform.hpp:28
gk::RenderStates::Default
static const RenderStates Default
Definition:
RenderStates.hpp:52
gk::VertexAttribute::LightValue
Definition:
RenderStates.hpp:33
gk::VertexAttribute::AmbientOcclusion
Definition:
RenderStates.hpp:35
gk::Shader
Definition:
Shader.hpp:28
Transform.hpp
gk::VertexAttribute::Only2d
Definition:
RenderStates.hpp:37
gk::RenderStates::viewMatrix
Transform viewMatrix
Definition:
RenderStates.hpp:44
gk::VertexAttribute::All
Definition:
RenderStates.hpp:38
gk::VertexAttribute::TexCoord
Definition:
RenderStates.hpp:31
IntTypes.hpp
Generated by
1.8.12