X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fglut%2Fgfx.h;fp=src%2Fglut%2Fgfx.h;h=8d5d81ddb59882ae9d384d4db1a4ff55cf335de7;hp=0000000000000000000000000000000000000000;hb=09e214b94e007964189222cca1e655f3aaefaf90;hpb=b2c24e9d5b637bb78d18a377d9957c07d0759030 diff --git a/src/glut/gfx.h b/src/glut/gfx.h new file mode 100644 index 0000000..8d5d81d --- /dev/null +++ b/src/glut/gfx.h @@ -0,0 +1,31 @@ +#ifndef GFX_H_ +#define GFX_H_ + +#include "inttypes.h" + +struct video_mode { + uint16_t mode; + short xsz, ysz, bpp, pitch; + short rbits, gbits, bbits; + short rshift, gshift, bshift; + uint32_t rmask, gmask, bmask; + uint32_t fb_addr; + short max_pages; + uint32_t bank_size; +}; + +struct video_mode *video_modes(void); +int num_video_modes(void); + +#define VMODE_CURRENT (-1) +struct video_mode *get_video_mode(int idx); + +int match_video_mode(int xsz, int ysz, int bpp); + +/* argument is the mode list index [0, nmodes-1] */ +void *set_video_mode(int idx, int nbuf); + +void blit_frame(void *pixels, int vsync); +void wait_vsync(void); + +#endif /* GFX_H_ */