aboutsummaryrefslogtreecommitdiff
path: root/examples/pointer.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-05-13 10:31:07 -0400
committerTony Crisci <tony@dubstepdish.com>2018-05-13 10:31:59 -0400
commitaedd3c6d46ba8dcfe6167cccba4dc082268436e7 (patch)
tree571e45656e8158f2bd4fdea5e7ee0e265c9d95c8 /examples/pointer.c
parent658a00602b22d2e5f6232ed93fd3744777282727 (diff)
make pointer show up in pointer example
Diffstat (limited to 'examples/pointer.c')
-rw-r--r--examples/pointer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/pointer.c b/examples/pointer.c
index 399b1de6..a316bce5 100644
--- a/examples/pointer.c
+++ b/examples/pointer.c
@@ -1,7 +1,6 @@
#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 500
#include <assert.h>
-#include <GLES2/gl2.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -97,14 +96,14 @@ void output_frame_notify(struct wl_listener *listener, void *data) {
struct sample_output *sample_output = wl_container_of(listener, sample_output, frame);
struct sample_state *sample = sample_output->sample;
struct wlr_output *wlr_output = sample_output->output;
+ struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
+ assert(renderer);
wlr_output_make_current(wlr_output, NULL);
-
- glClearColor(sample->clear_color[0], sample->clear_color[1],
- sample->clear_color[2], sample->clear_color[3]);
- glClear(GL_COLOR_BUFFER_BIT);
-
+ wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
+ wlr_renderer_clear(renderer, sample->clear_color);
wlr_output_swap_buffers(wlr_output, NULL, NULL);
+ wlr_renderer_end(renderer);
}
static void handle_cursor_motion(struct wl_listener *listener, void *data) {