summaryrefslogtreecommitdiff
path: root/archive/src/apidocs/index.html
blob: a72dbf31825bebcdd10cfb9f9bf5ddaffbf56d17 (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <link rel="stylesheet" href="doc_styles.css">
    <!-- <link rel="stylesheet" href="prism.css"> -->
    <!-- <script src="prism.js"></script> -->

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
    <!-- and it's easy to individually load additional languages -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>
    <script>hljs.highlightAll();</script>

    <title>Celeritas core API</title>
</head>
<body>
<main>

<header>
    <h1>CELERITAS CORE API DOCS</h1>
</header>
<h3>Core</h3><ul class="category-list">
    <li class="signature">
    <pre><code class="language-c">Camera Camera_Create(Vec3 pos, Vec3 front, Vec3 up, f32 fov)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Mat4 Camera_View2D(Camera* c)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void FlyCamera_Update(Camera* camera)</code></pre>
    </li>
    </ul><h3>Render</h3><ul class="category-list">
    <li class="signature">
    <pre><code class="language-c">Skybox Skybox_Create(const char** face_paths, int n)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Skybox_Draw(Skybox* skybox, Camera camera)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void SetCamera(Camera camera)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void SetMainLight(DirectionalLight light)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void PBR_Init(PBR_Storage* storage)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Material PBRMaterialDefault()</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">ShaderDataLayout PBRMaterial_GetLayout(void* data)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Shadow_Init(Shadow_Storage* storage, u32 shadowmap_width, u32 shadowmap_height)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Shadow_Run(RenderEnt* entities, size_t entity_count)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Shadow_DrawDebugQuad()</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">TextureHandle Shadow_GetShadowMapTexture(Shadow_Storage* storage)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Immdraw_Init(Immdraw_Storage* storage)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Immdraw_Shutdown(Immdraw_Storage* storage)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Immdraw_Plane(Transform tf, Vec4 colour, bool wireframe)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Immdraw_Cuboid(Transform tf, Vec4 colour, bool wireframe)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Immdraw_Sphere(Transform tf, f32 size, Vec4 colour, bool wireframe)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Immdraw_TransformGizmo(Transform tf, f32 size)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void EncodeDrawModel(Handle model, Mat4 transform)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void EncodeDrawMesh(Mesh* mesh, Material* material, Mat4 affine)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Renderer_Shutdown(Renderer* renderer)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">size_t Renderer_GetMemReqs()</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Render_FrameBegin(Renderer* renderer)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Render_FrameEnd(Renderer* renderer)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Render_RenderEntities(RenderEnt* entities, size_t entity_count)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">TextureData TextureDataLoad(const char* path, bool invert_y)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void TextureUpload(TextureHandle handle, size_t n_bytes, const void* data)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">TextureHandle TextureLoadFromFile(const char* path)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">ModelHandle ModelLoad(const char* debug_name, const char* filepath)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Mesh Mesh_Create(Geometry* geometry, bool free_on_upload)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Mesh_Delete(Mesh* mesh)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void DrawMesh(Mesh* mesh, Material* material, Mat4 model)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void Render_DrawTerrain()</code></pre>
    </li>
    </ul><h3>Maths</h3><ul class="category-list">
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_normalise(Vec3 a)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_create(f32 x, f32 y, f32 z)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_add(Vec3 a, Vec3 b)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_sub(Vec3 a, Vec3 b)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_mult(Vec3 a, f32 s)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_div(Vec3 a, f32 s)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">f32 vec3_len_squared(Vec3 a)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">f32 vec3_len(Vec3 a)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_negate(Vec3 a)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_normalise(Vec3 a)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">f32 vec3_dot(Vec3 a, Vec3 b)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">Vec3 vec3_cross(Vec3 a, Vec3 b)</code></pre>
    </li>
    </ul><h3>RAL</h3><ul class="category-list">
    <li class="signature">
    <pre><code class="language-c">void GPU_Renderpass_Destroy(GPU_Renderpass* pass)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GraphicsPipeline_Destroy(GPU_Pipeline* pipeline)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">GPU_CmdEncoder GPU_CmdEncoder_Create()</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_CmdEncoder_Destroy(GPU_CmdEncoder* encoder)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_CmdEncoder_Begin(GPU_CmdEncoder* encoder)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_CmdEncoder_Finish(GPU_CmdEncoder* encoder)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_CmdEncoder_BeginRender(GPU_CmdEncoder* encoder, GPU_Renderpass* renderpass)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_CmdEncoder_EndRender(GPU_CmdEncoder* encoder)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_QueueSubmit(GPU_CmdBuffer* cmd_buffer)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_BufferDestroy(BufferHandle handle)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_BufferUpload(BufferHandle buffer, size_t n_bytes, const void* data)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">TextureHandle GPU_TextureCreate(TextureDesc desc, bool create_view, const void* data)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_TextureDestroy(TextureHandle handle)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_TextureUpload(TextureHandle handle, size_t n_bytes, const void* data)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_EncodeBindPipeline(GPU_CmdEncoder* encoder, GPU_Pipeline* pipeline)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_EncodeBindShaderData(GPU_CmdEncoder* encoder, u32 group, ShaderData data)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_EncodeSetVertexBuffer(GPU_CmdEncoder* encoder, BufferHandle buf)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_EncodeSetIndexBuffer(GPU_CmdEncoder* encoder, BufferHandle buf)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_EncodeDraw(GPU_CmdEncoder* encoder, u64 count)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_EncodeDrawIndexed(GPU_CmdEncoder* encoder, u64 index_count)</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">bool GPU_Backend_BeginFrame()</code></pre>
    </li>
    
    <li class="signature">
    <pre><code class="language-c">void GPU_Backend_EndFrame()</code></pre>
    </li>
    </ul>
</main>
</body>
</html>