-
Notifications
You must be signed in to change notification settings - Fork 0
/
Commands.cpp
101 lines (98 loc) · 5.08 KB
/
Commands.cpp
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// Created by Marrony Neris on 12/17/15.
//
#include "Commands.h"
const FnSubmitCommand submitCommand[] = {
[DRAW_ARRAYS] = FnSubmitCommand(DrawArrays::submit),
[DRAW_ARRAYS_INSTANCED] = FnSubmitCommand(DrawArraysInstanced::submit),
[DRAW_TRIANGLES] = FnSubmitCommand(DrawTriangles::submit),
[DRAW_TRIANGLES_INSTANCED] = FnSubmitCommand(DrawTrianglesInstanced::submit),
[CLEAR_COLOR0] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR1] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR2] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR3] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR4] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR5] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR6] = FnSubmitCommand(ClearColor::submit),
[CLEAR_COLOR7] = FnSubmitCommand(ClearColor::submit),
[CLEAR_DEPTH_STENCIL] = FnSubmitCommand(ClearDepthStencil::submit),
[BIND_FRAMEBUFFER] = FnSubmitCommand(BindFramebuffer::submit),
[SET_VIEWPORT0] = FnSubmitCommand(SetViewport::submit),
[SET_VIEWPORT1] = FnSubmitCommand(SetViewport::submit),
[SET_VIEWPORT2] = FnSubmitCommand(SetViewport::submit),
[SET_VIEWPORT3] = FnSubmitCommand(SetViewport::submit),
[SET_SCISSOR0] = FnSubmitCommand(SetScissor::submit),
[SET_SCISSOR1] = FnSubmitCommand(SetScissor::submit),
[SET_SCISSOR2] = FnSubmitCommand(SetScissor::submit),
[SET_SCISSOR3] = FnSubmitCommand(SetScissor::submit),
[SET_DEPTH_TEST] = FnSubmitCommand(SetDepthTest::submit),
[SET_CULL_FACE] = FnSubmitCommand(SetCullFace::submit),
[SET_BLEND0] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND1] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND2] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND3] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND4] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND5] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND6] = FnSubmitCommand(SetBlend::submit),
[SET_BLEND7] = FnSubmitCommand(SetBlend::submit),
[SET_DRAWBUFFERS] = FnSubmitCommand(SetDrawBuffers::submit),
[COPY_CONSTANT_BUFFER] = FnSubmitCommand(CopyConstantBuffer::submit),
[BIND_CONSTANT_BUFFER] = FnSubmitCommand(BindConstantBuffer::submit),
[BIND_VERTEX_ARRAY] = FnSubmitCommand(BindVertexArray::submit),
[BIND_PROGRAM] = FnSubmitCommand(BindProgram::submit),
[BIND_TEXTURE0] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE1] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE2] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE3] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE4] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE5] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE6] = FnSubmitCommand(BindTexture::submit),
[BIND_TEXTURE7] = FnSubmitCommand(BindTexture::submit),
};
const int sizeCommand[] = {
[DRAW_ARRAYS] = sizeof(DrawArrays),
[DRAW_ARRAYS_INSTANCED] = sizeof(DrawArraysInstanced),
[DRAW_TRIANGLES] = sizeof(DrawTriangles),
[DRAW_TRIANGLES_INSTANCED] = sizeof(DrawTrianglesInstanced),
[CLEAR_COLOR0] = sizeof(ClearColor),
[CLEAR_COLOR1] = sizeof(ClearColor),
[CLEAR_COLOR2] = sizeof(ClearColor),
[CLEAR_COLOR3] = sizeof(ClearColor),
[CLEAR_COLOR4] = sizeof(ClearColor),
[CLEAR_COLOR5] = sizeof(ClearColor),
[CLEAR_COLOR6] = sizeof(ClearColor),
[CLEAR_COLOR7] = sizeof(ClearColor),
[CLEAR_DEPTH_STENCIL] = sizeof(ClearDepthStencil),
[BIND_FRAMEBUFFER] = sizeof(BindFramebuffer),
[SET_VIEWPORT0] = sizeof(SetViewport),
[SET_VIEWPORT1] = sizeof(SetViewport),
[SET_VIEWPORT2] = sizeof(SetViewport),
[SET_VIEWPORT3] = sizeof(SetViewport),
[SET_SCISSOR0] = sizeof(SetScissor),
[SET_SCISSOR1] = sizeof(SetScissor),
[SET_SCISSOR2] = sizeof(SetScissor),
[SET_SCISSOR3] = sizeof(SetScissor),
[SET_DEPTH_TEST] = sizeof(SetDepthTest),
[SET_CULL_FACE] = sizeof(SetCullFace),
[SET_BLEND0] = sizeof(SetBlend),
[SET_BLEND1] = sizeof(SetBlend),
[SET_BLEND2] = sizeof(SetBlend),
[SET_BLEND3] = sizeof(SetBlend),
[SET_BLEND4] = sizeof(SetBlend),
[SET_BLEND5] = sizeof(SetBlend),
[SET_BLEND6] = sizeof(SetBlend),
[SET_BLEND7] = sizeof(SetBlend),
[SET_DRAWBUFFERS] = sizeof(SetDrawBuffers),
[COPY_CONSTANT_BUFFER] = sizeof(CopyConstantBuffer),
[BIND_CONSTANT_BUFFER] = sizeof(BindConstantBuffer),
[BIND_VERTEX_ARRAY] = sizeof(BindVertexArray),
[BIND_PROGRAM] = sizeof(BindProgram),
[BIND_TEXTURE0] = sizeof(BindTexture),
[BIND_TEXTURE1] = sizeof(BindTexture),
[BIND_TEXTURE2] = sizeof(BindTexture),
[BIND_TEXTURE3] = sizeof(BindTexture),
[BIND_TEXTURE4] = sizeof(BindTexture),
[BIND_TEXTURE5] = sizeof(BindTexture),
[BIND_TEXTURE6] = sizeof(BindTexture),
[BIND_TEXTURE7] = sizeof(BindTexture),
};