-
Notifications
You must be signed in to change notification settings - Fork 9
/
umldiag.txt
84 lines (69 loc) · 1.65 KB
/
umldiag.txt
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
@startuml
title Relationships - Class Diagram
class Renderer {
+Renderer *makeRenderer(BACKEND backend);
+int initialize(width, height)
+void present()
+int shutdown()
+void setClearColor(float, float, float, float)
+void clearBuffer(CLEAR_BUFFER_FLAGS)
+void setRenderState(RenderState*)
+void submit(Mesh*)
+void frame();
}
class Mesh {
+void addIAVertexBufferBinding(...)
+void bindVertexBuffer(...)
+void addTexture(...)
+map<location, pair<offset, VertexBufferBind>> geometryBuffers
+map<location, pair<offset, Texture2D>> textures
+Technique* technique
+Transform* transform;
+ConstantBuffer* txBuffer;
}
class VertexBufferBind {
size_t numElements;
size_t offset;
VertexBuffer* buffer;
}
class Material {
+void setShader(filename, SHADER_TYPE)
+void removeShader(SHADER_TYPE)
+void addDefine(defineText, SHADER_TYPE)
+int compileMaterial(string& err)
+int enable()
+void disable()
}
class Technique {
// single pass
Material* material
vector<ResourceBinding*> bindings
RenderState* rs
'+int updateAttribute(SHADER_TYPE,name,data,size)
'+int setAttributePointer(SHADER_TYPE,name,ptr)
}
class ConstantBuffer {
+void setData(...)
+void bind(...)
}
class VertexBuffer {
+void setData(...)
+void bind(...)
+void unbind(...)
+size_t getSize()
}
class Texture2D {
+int loadFromFile(string)
Sampler2D* sampler;
}
'composition
VertexBufferBind "1" *-down- "1" VertexBuffer
Mesh "1" *-down- "*" VertexBufferBind
Mesh "1" *-down- "*" Texture2D
Mesh "1" *-down- "1" ConstantBuffer
Texture2D "1" *-down- "1" Sampler2D
Mesh "1" *-down- "1" Technique
'Mesh "1" *-right- "*" Buffer
Technique "1" *-up- "1" Material
Technique "1" *-down- "1" RenderState
@enduml