-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathtgl_base.hpp
74 lines (65 loc) · 2.04 KB
/
tgl_base.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
//=====================================================================//
/*! @file
@brief Tiny 3D Glaphics Library (Tiny OpenGL)
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2021 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=====================================================================//
#include "common/vtx.hpp"
#include "graphics/color.hpp"
#include "graphics/glmatrix.hpp"
namespace graphics {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief TinyGL base class
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
class tgl_base {
public:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief TinyGL Primitive Type
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class PTYPE : uint8_t {
NONE,
POINTS, ///< 点の描画
LINES, ///< 単線の描画
LINE_STRIP, ///< 複数線の描画
LINE_LOOP, ///< 閉じた線の描画
QUAD, ///< 4角形の描画
TRIANGLE, ///< 3角形の描画
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief TinyGL 制御型
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class CTRL : uint8_t {
NONE,
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief TinyGL ターゲット型(テクスチャー)
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class TARGET : uint8_t {
NONE,
TEXTURE_2D,
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief TinyGL フォーマット型(テクスチャー・ピクセル)
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class FORMAT : uint8_t {
RGBA8, ///< R:8, G:8, B:8, A:8 (32 bits)
RGB565, ///< R:5, G:6, B:5 (16 bits)
RGBA4, ///< R:4, G:4, B:4, A:4 (16 bits)
};
typedef gl::matrixf MATRIX;
};
}