Properly link flecs library
This commit is contained in:
35
engine/libs/flecs/examples/plecs/strings.flecs
Normal file
35
engine/libs/flecs/examples/plecs/strings.flecs
Normal file
@@ -0,0 +1,35 @@
|
||||
// To see what the result of parsing this file looks like, copy the code and
|
||||
// paste it into the editor at https://flecs.dev/explorer
|
||||
//
|
||||
// To load this file yourself, call ecs_plecs_from_file("strings.flecs");
|
||||
|
||||
// Plecs component values can be populated with strings. To see how this works,
|
||||
// we first need to create a component type (see reflection example).
|
||||
using flecs.meta
|
||||
|
||||
Struct Shader {
|
||||
filename :- {string}
|
||||
code :- {string}
|
||||
}
|
||||
|
||||
// Create component values with strings
|
||||
my_pipeline {
|
||||
- (Shader, Vertex) {
|
||||
// Normal string
|
||||
filename: "vert.glsl",
|
||||
|
||||
// Multiline string
|
||||
code: `
|
||||
void main() {
|
||||
gl_Position = pos;
|
||||
}`
|
||||
}
|
||||
|
||||
- (Shader, Fragment) {
|
||||
filename: "frag.glsl",
|
||||
code: `
|
||||
void main() {
|
||||
frag_color = color;
|
||||
}`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user