mesh_render_prim addition
parent
cf45869d14
commit
d1204acada
|
@ -21,6 +21,7 @@ int main() {
|
|||
if (input(KEY_F5)) window_reload();
|
||||
|
||||
shader_bind(program);
|
||||
shader_float("t", (float)window_time());
|
||||
mesh_render_prim(&m, GL_POINTS);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#version 330 core
|
||||
layout (points) in;
|
||||
layout (line_strip, max_vertices = 2) out;
|
||||
|
||||
uniform float t;
|
||||
|
||||
void main() {
|
||||
gl_Position = gl_in[0].gl_Position + vec4(-0.1, 0.0, 0.0, 0.0);
|
||||
gl_Position = gl_in[0].gl_Position + vec4(-0.1 + sin(t)*0.1, 0.0, 0.0, 0.0);
|
||||
EmitVertex();
|
||||
|
||||
gl_Position = gl_in[0].gl_Position + vec4( 0.1, 0.0, 0.0, 0.0);
|
||||
gl_Position = gl_in[0].gl_Position + vec4( 0.1 - sin(t)*0.1, 0.0, 0.0, 0.0);
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
|
|
|
@ -596,7 +596,7 @@ details > summary::-webkit-details-marker {
|
|||
|Version: | 2023.7 |
|
||||
|:--------------|:------------|
|
||||
|Branch: | main |
|
||||
|Commit: | 69 |
|
||||
|Commit: | 70 |
|
||||
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
|
||||
|
||||
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)
|
||||
|
|
Loading…
Reference in New Issue