summaryrefslogtreecommitdiff
path: root/src/surface.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-10-31 16:47:03 +0000
committerPhil Jones <philj56@gmail.com>2021-10-31 16:54:20 +0000
commit74adfe0cbca300e73774c6e0aa9b3c53a5e5b57b (patch)
tree88d0efbdd9755849eb22ee3478595df5c8e69a34 /src/surface.c
parentc691b8e48c572e2d5f1c7c16c8f42babd7d706d5 (diff)
Add HiDPI support and lots of cleanup.
Diffstat (limited to 'src/surface.c')
-rw-r--r--src/surface.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/surface.c b/src/surface.c
index 6253801..76abec9 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -5,14 +5,24 @@
#undef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
-void surface_initialise(struct surface *surface, struct wl_display *wl_display, struct image *texture)
+void surface_initialise(
+ struct surface *surface,
+ struct wl_display *wl_display,
+ struct image *texture)
{
- egl_create_window(&surface->egl, surface->wl_surface, surface->width, surface->height);
+ egl_create_window(
+ &surface->egl,
+ surface->wl_surface,
+ surface->width,
+ surface->height);
egl_create_context(&surface->egl, wl_display);
gl_initialise(&surface->gl, texture);
}
-void surface_draw(struct surface *surface, struct color *color, struct image *texture)
+void surface_draw(
+ struct surface *surface,
+ struct color *color,
+ struct image *texture)
{
egl_make_current(&surface->egl);
gl_clear(&surface->gl, color);