diff options
author | rodri <rgl@antares-labs.eu> | 2024-08-07 11:47:31 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-08-07 11:47:31 +0000 |
commit | 03149e5536a831e2ea7a20175f04938343529c99 (patch) | |
tree | 9494afdaa6be39a528640b2bf43bb773c1b55cf3 /graphics.h | |
parent | 05ae0d42a944f6c7d940a5e58eb90b619dadbfdb (diff) | |
download | libgraphics-03149e5536a831e2ea7a20175f04938343529c99.tar.gz libgraphics-03149e5536a831e2ea7a20175f04938343529c99.tar.bz2 libgraphics-03149e5536a831e2ea7a20175f04938343529c99.zip |
offset fb during drawing based on viewport config. move OBJ-related procedures to its own unit.
Diffstat (limited to 'graphics.h')
-rw-r--r-- | graphics.h | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -261,10 +261,10 @@ struct Framebufctl uint idx; /* front buffer index */ uint upfilter; /* upscaling filter */ - void (*draw)(Framebufctl*, Image*); - void (*upscaledraw)(Framebufctl*, Image*, Point); - void (*memdraw)(Framebufctl*, Memimage*); - void (*upscalememdraw)(Framebufctl*, Memimage*, Point); + void (*draw)(Framebufctl*, Image*, Point); + void (*upscaledraw)(Framebufctl*, Image*, Point, Point); + void (*memdraw)(Framebufctl*, Memimage*, Point); + void (*upscalememdraw)(Framebufctl*, Memimage*, Point, Point); void (*drawnormals)(Framebufctl*, Image*); void (*swap)(Framebufctl*); void (*reset)(Framebufctl*); @@ -283,6 +283,8 @@ struct Viewport void (*setscale)(Viewport*, double, double); void (*setscalefilter)(Viewport*, int); Framebuf *(*getfb)(Viewport*); + int (*getwidth)(Viewport*); + int (*getheight)(Viewport*); }; struct Camera @@ -344,8 +346,11 @@ Point3 world2model(Entity*, Point3); void perspective(Matrix3, double, double, double, double); void orthographic(Matrix3, double, double, double, double, double, double); -/* scene */ +/* obj */ int loadobjmodel(Model*, OBJ*); +Model *readobjmodel(char*); + +/* scene */ Model *newmodel(void); Model *dupmodel(Model*); void delmodel(Model*); |