summaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-08-02 15:22:46 +0000
committerrodri <rgl@antares-labs.eu>2024-08-02 15:22:46 +0000
commitc47e5c9807a0d3bf86c2bc227482584aaca7bb9c (patch)
tree5318556eb732a3156fbbcd6fb4efd1b3c3302187 /graphics.h
parent2267dba0ea8f61cf4b3e51492995f8edea03dcc8 (diff)
downloadlibgraphics-c47e5c9807a0d3bf86c2bc227482584aaca7bb9c.tar.gz
libgraphics-c47e5c9807a0d3bf86c2bc227482584aaca7bb9c.tar.bz2
libgraphics-c47e5c9807a0d3bf86c2bc227482584aaca7bb9c.zip
add a viewport upscale filters interface.
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h9
1 files changed, 9 insertions, 0 deletions
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*);
};