make pointer show up in pointer example
This commit is contained in:
parent
658a00602b
commit
aedd3c6d46
|
@ -1,7 +1,6 @@
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 500
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <GLES2/gl2.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.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_output *sample_output = wl_container_of(listener, sample_output, frame);
|
||||||
struct sample_state *sample = sample_output->sample;
|
struct sample_state *sample = sample_output->sample;
|
||||||
struct wlr_output *wlr_output = sample_output->output;
|
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);
|
wlr_output_make_current(wlr_output, NULL);
|
||||||
|
wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
|
||||||
glClearColor(sample->clear_color[0], sample->clear_color[1],
|
wlr_renderer_clear(renderer, sample->clear_color);
|
||||||
sample->clear_color[2], sample->clear_color[3]);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
|
|
||||||
wlr_output_swap_buffers(wlr_output, NULL, NULL);
|
wlr_output_swap_buffers(wlr_output, NULL, NULL);
|
||||||
|
wlr_renderer_end(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_cursor_motion(struct wl_listener *listener, void *data) {
|
static void handle_cursor_motion(struct wl_listener *listener, void *data) {
|
||||||
|
|
Loading…
Reference in New Issue