shadertoy: set viewport

main
Dominik Madarász 2024-03-29 00:21:53 +01:00
parent 594b8a0136
commit 1b6169a515
4 changed files with 10 additions and 3 deletions

4
.vscode/settings.json vendored 100644
View File

@ -0,0 +1,4 @@
{
"dotnet.defaultSolution": "disable",
"C_Cpp.errorSquiggles": "disabled"
}

View File

@ -372811,6 +372811,7 @@ shadertoy_t* shadertoy_render(shadertoy_t *s, float delta) {
} }
} }
glViewport(0, 0, s->dims.x ? s->dims.x : window_width(), s->dims.y ? s->dims.y : window_height());
glBindVertexArray(s->vao); glBindVertexArray(s->vao);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);

View File

@ -2792,6 +2792,7 @@ shadertoy_t* shadertoy_render(shadertoy_t *s, float delta) {
} }
} }
glViewport(0, 0, s->dims.x ? s->dims.x : window_width(), s->dims.y ? s->dims.y : window_height());
glBindVertexArray(s->vao); glBindVertexArray(s->vao);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);

View File

@ -19964,6 +19964,7 @@ shadertoy_t* shadertoy_render(shadertoy_t *s, float delta) {
} }
} }
glViewport(0, 0, s->dims.x ? s->dims.x : window_width(), s->dims.y ? s->dims.y : window_height());
glBindVertexArray(s->vao); glBindVertexArray(s->vao);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);