18 KINC_G1_TEXTURE_FILTER_POINT,
19 KINC_G1_TEXTURE_FILTER_LINEAR,
20 KINC_G1_TEXTURE_FILTER_ANISOTROPIC,
21} kinc_g1_texture_filter_t;
24 KINC_G1_MIPMAP_FILTER_NONE,
25 KINC_G1_MIPMAP_FILTER_POINT,
26 KINC_G1_MIPMAP_FILTER_LINEAR,
27} kinc_g1_mipmap_filter_t;
47extern uint32_t *kinc_internal_g1_image;
48extern int kinc_internal_g1_w, kinc_internal_g1_h, kinc_internal_g1_tex_width;
49extern kinc_g1_texture_filter_t kinc_internal_g1_texture_filter_min;
50extern kinc_g1_texture_filter_t kinc_internal_g1_texture_filter_mag;
51extern kinc_g1_mipmap_filter_t kinc_internal_g1_mipmap_filter;
53#if defined(KINC_DYNAMIC_COMPILE) || defined(KINC_DYNAMIC) || defined(KINC_DOCS)
102static inline void kinc_g1_set_pixel(
int x,
int y,
float red,
float green,
float blue) {
103 assert(x >= 0 && x < kinc_internal_g1_w && y >= 0 && y < kinc_internal_g1_h);
104 int r = (int)(red * 255);
105 int g = (int)(green * 255);
106 int b = (int)(blue * 255);
107 kinc_internal_g1_image[y * kinc_internal_g1_tex_width + x] = 0xff << 24 | b << 16 | g << 8 | r;
111 return kinc_internal_g1_w;
115 return kinc_internal_g1_h;
119 kinc_internal_g1_texture_filter_mag = filter;
123 kinc_internal_g1_texture_filter_min = filter;
127 kinc_internal_g1_mipmap_filter = filter;
Provides some utility functionality for handling 32 bit ARGB color values.
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC void kinc_g1_set_texture_minification_filter(kinc_g1_texture_filter_t filter)
Set the texture-sampling-mode for downscaled textures.
KINC_FUNC void kinc_g1_set_texture_magnification_filter(kinc_g1_texture_filter_t filter)
Set the texture-sampling-mode for upscaled textures.
KINC_FUNC void kinc_g1_end(void)
Typically called once per frame after all G1-drawing is finished. This also swaps the framebuffers so...
KINC_FUNC void kinc_g1_begin(void)
Typically called once per frame before other G1-functions are called.
KINC_FUNC int kinc_g1_height(void)
Returns the height used by G1.
KINC_FUNC void kinc_g1_init(int width, int height)
Initializes the G1-API.
KINC_FUNC int kinc_g1_width(void)
Returns the width used by G1.
KINC_FUNC void kinc_g1_set_pixel(int x, int y, float red, float green, float blue)
Sets a single pixel to a color.
KINC_FUNC void kinc_g1_set_texture_mipmap_filter(kinc_g1_mipmap_filter_t filter)
Sets the mipmap-sampling-mode which defines whether mipmaps are used at all and if so whether the two...