aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-05-31 15:15:42 -0400
committerDrew DeVault <sir@cmpwn.com>2017-05-31 15:15:42 -0400
commit03c9b460346592c902920de2fe16a15dd72f71df (patch)
treea0692cbfd73fdd6738cb12306db9ef7a254e22fa /example
parent66e02e97ec3322b6453bf0db227fd2cd6c39c819 (diff)
Have backend manage opengl context
Diffstat (limited to 'example')
-rw-r--r--example/main.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/example/main.c b/example/main.c
index ed9eac0b..fb475ac8 100644
--- a/example/main.c
+++ b/example/main.c
@@ -24,9 +24,7 @@ struct output_state {
};
void output_frame(struct wl_listener *listener, void *data) {
- struct wlr_output *output = data;
- struct output_state *ostate = wl_container_of(
- listener, ostate, frame);
+ struct output_state *ostate = wl_container_of(listener, ostate, frame);
struct state *s = ostate->state;
struct timespec now;
@@ -48,12 +46,8 @@ void output_frame(struct wl_listener *listener, void *data) {
s->last_frame = now;
- wlr_drm_output_begin(output);
-
glClearColor(s->color[0], s->color[1], s->color[2], 1.0);
glClear(GL_COLOR_BUFFER_BIT);
-
- wlr_drm_output_end(output);
}
void output_add(struct wl_listener *listener, void *data) {