summaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
Diffstat (limited to 'src/example')
-rw-r--r--src/example/02_cube/02_cube.c4
-rw-r--r--src/example/04_bloom/postprocess.c10
-rw-r--r--src/example/04_bloom/preprocess.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/example/02_cube/02_cube.c b/src/example/02_cube/02_cube.c
index 7e0840e..3479619 100644
--- a/src/example/02_cube/02_cube.c
+++ b/src/example/02_cube/02_cube.c
@@ -52,11 +52,11 @@ void ondrawcube(void*data) {
for (int i = 0; i < 8; ++i) {
Vec4 v = { verts[i].x, verts[i].y ,verts[i].z ,1 }, temp;
- mat4_mulvec4(&m, &v, &temp);
+ internal_mat4_mulvec4(&m, &v, &temp);
temp.x /= temp.w;
temp.y /= temp.w;
temp.z /= temp.w;
- //vec4_print(&temp);
+ //internal_vec4_print(&temp);
proj[i].x = temp.x;
proj[i].y = temp.y;
}
diff --git a/src/example/04_bloom/postprocess.c b/src/example/04_bloom/postprocess.c
index 1ec10e4..06cb105 100644
--- a/src/example/04_bloom/postprocess.c
+++ b/src/example/04_bloom/postprocess.c
@@ -19,18 +19,18 @@ static bool frag(UniformCollection* uniforms, FragmentShaderIn* in, Color32* col
float off = 1 / 600.f;
//blur
*color = tex2d(_frag_tex, _texcoord);
- vec4_scale(color, weight[0], color);
+ internal_vec4_scale(color, weight[0], color);
Vec2 p = {0, _texcoord->y};
Color32 c;
for (int i = 1; i < 5; ++i) {
p.x = _texcoord->x + off * i;
c = tex2d(_frag_tex, &p);
- vec4_scale(&c, weight[i], &c);
- vec4_add(color, &c, color);
+ internal_vec4_scale(&c, weight[i], &c);
+ internal_vec4_add(color, &c, color);
p.x = _texcoord->x - off * i;
c = tex2d(_frag_tex, &p);
- vec4_scale(&c, weight[i], &c);
- vec4_add(color, &c, color);
+ internal_vec4_scale(&c, weight[i], &c);
+ internal_vec4_add(color, &c, color);
}
return 1;
}
diff --git a/src/example/04_bloom/preprocess.c b/src/example/04_bloom/preprocess.c
index def9fd8..d7d4b21 100644
--- a/src/example/04_bloom/preprocess.c
+++ b/src/example/04_bloom/preprocess.c
@@ -7,7 +7,7 @@
static void vert(UniformCollection* uniforms, VertexShaderIn* in, Vec4* clipcoord) {
static Vec4 p; p.xyz = in->vertex->position; p.w = 1;
- mat4_mulvec4(uniforms->mvp, &p, clipcoord);
+ internal_mat4_mulvec4(uniforms->mvp, &p, clipcoord);
color_tocolor32(in->vertex->color, _color);
}