diff options
author | rodri <rgl@antares-labs.eu> | 2024-08-02 15:22:46 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-08-02 15:22:46 +0000 |
commit | c47e5c9807a0d3bf86c2bc227482584aaca7bb9c (patch) | |
tree | 5318556eb732a3156fbbcd6fb4efd1b3c3302187 /graphics.h | |
parent | 2267dba0ea8f61cf4b3e51492995f8edea03dcc8 (diff) | |
download | libgraphics-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.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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*); }; |