From c47e5c9807a0d3bf86c2bc227482584aaca7bb9c Mon Sep 17 00:00:00 2001 From: rodri Date: Fri, 2 Aug 2024 15:22:46 +0000 Subject: add a viewport upscale filters interface. --- graphics.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'graphics.h') diff --git a/graphics.h b/graphics.h index 476f954..52becf3 100644 --- a/graphics.h +++ b/graphics.h @@ -25,6 +25,12 @@ enum { RAWTexture = 0, /* unmanaged */ sRGBTexture, + /* upscaling filters */ + UFNone = 0, /* nearest neighbour */ + UFScale2x, + UFScale3x, + UFScale4x, + /* vertex attribute types */ VAPoint = 0, VANumber, @@ -253,6 +259,7 @@ struct Framebufctl QLock; Framebuf *fb[2]; /* double buffering */ uint idx; /* front buffer index */ + uint upfilter; /* upscaling filter */ void (*draw)(Framebufctl*, Image*); void (*upscaledraw)(Framebufctl*, Image*, Point); @@ -273,6 +280,8 @@ struct Viewport void (*draw)(Viewport*, Image*); void (*memdraw)(Viewport*, Memimage*); + void (*setscale)(Viewport*, double, double); + void (*setscalefilter)(Viewport*, int); Framebuf *(*getfb)(Viewport*); }; -- cgit v1.2.3