aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pugl_gl3_demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pugl_gl3_demo.c')
-rw-r--r--examples/pugl_gl3_demo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/pugl_gl3_demo.c b/examples/pugl_gl3_demo.c
index 3a9503c..c49ed3d 100644
--- a/examples/pugl_gl3_demo.c
+++ b/examples/pugl_gl3_demo.c
@@ -138,14 +138,14 @@ onExpose(PuglView* view)
const float offset[2] = {normal * 128.0f, normal * 128.0f};
// Move rect around in an arbitrary way that looks cool
- rect->pos[0] =
- (float)(width - rect->size[0] + offset[0]) *
- (sinf((float)time * rect->size[0] / 64.0f + normal) + 1.0f) /
- 2.0f;
- rect->pos[1] =
- (float)(height - rect->size[1] + offset[1]) *
- (cosf((float)time * rect->size[1] / 64.0f + normal) + 1.0f) /
- 2.0f;
+ rect->pos[0] = (width - rect->size[0] + offset[0]) *
+ (sinf((float)time * rect->size[0] / 64.0f + normal) +
+ 1.0f) /
+ 2.0f;
+ rect->pos[1] = (height - rect->size[1] + offset[1]) *
+ (cosf((float)time * rect->size[1] / 64.0f + normal) +
+ 1.0f) /
+ 2.0f;
}
glBufferSubData(GL_ARRAY_BUFFER,