aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pugl_clipboard_demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pugl_clipboard_demo.c')
-rw-r--r--examples/pugl_clipboard_demo.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/pugl_clipboard_demo.c b/examples/pugl_clipboard_demo.c
index efeb1eb..04929ab 100644
--- a/examples/pugl_clipboard_demo.c
+++ b/examples/pugl_clipboard_demo.c
@@ -4,10 +4,11 @@
// A demonstration of using clipboards for copy/paste and drag and drop
#include "cube_view.h"
-#include "test/test_utils.h"
-#include "pugl/gl.h"
-#include "pugl/pugl.h"
+#include <puglutil/test_utils.h>
+
+#include <pugl/gl.h>
+#include <pugl/pugl.h>
#include <math.h>
#include <stdbool.h>
@@ -44,8 +45,8 @@ onDisplay(PuglView* view)
if (app->continuous) {
const double dTime = thisTime - cube->lastDrawTime;
- cube->xAngle = fmod(cube->xAngle + dTime * 100.0, 360.0);
- cube->yAngle = fmod(cube->yAngle + dTime * 100.0, 360.0);
+ cube->xAngle = fmod(cube->xAngle + (dTime * 100.0), 360.0);
+ cube->yAngle = fmod(cube->yAngle + (dTime * 100.0), 360.0);
}
displayCube(
@@ -116,7 +117,7 @@ static void
redisplayView(PuglTestApp* app, PuglView* view)
{
if (!app->continuous) {
- puglPostRedisplay(view);
+ puglObscureView(view);
}
}
@@ -135,7 +136,7 @@ onEvent(PuglView* view, const PuglEvent* event)
break;
case PUGL_UPDATE:
if (app->continuous) {
- puglPostRedisplay(view);
+ puglObscureView(view);
}
break;
case PUGL_EXPOSE: