Supports a very basic pixel-setting API.
More...
#include <kinc/global.h>
#include <kinc/color.h>
#include <assert.h>
Go to the source code of this file.
|
| enum | kinc_g1_texture_filter_t { KINC_G1_TEXTURE_FILTER_POINT
, KINC_G1_TEXTURE_FILTER_LINEAR
, KINC_G1_TEXTURE_FILTER_ANISOTROPIC
} |
| enum | kinc_g1_mipmap_filter_t { KINC_G1_MIPMAP_FILTER_NONE
, KINC_G1_MIPMAP_FILTER_POINT
, KINC_G1_MIPMAP_FILTER_LINEAR
} |
|
| KINC_FUNC void | kinc_g1_init (int width, int height) |
| | Initializes the G1-API.
|
|
KINC_FUNC void | kinc_g1_begin (void) |
| | Typically called once per frame before other G1-functions are called.
|
|
KINC_FUNC void | kinc_g1_end (void) |
| | Typically called once per frame after all G1-drawing is finished. This also swaps the framebuffers so an equivalent call to kinc_g4_swap_buffers is not needed.
|
| 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 int | kinc_g1_width (void) |
| | Returns the width used by G1.
|
| KINC_FUNC int | kinc_g1_height (void) |
| | Returns the height used by G1.
|
| 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_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_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 neighbouring mipmaps are linearly interpolated.
|
Supports a very basic pixel-setting API.
◆ kinc_g1_height()
| KINC_FUNC int kinc_g1_height |
( |
void | | ) |
|
Returns the height used by G1.
- Returns
- The height
◆ kinc_g1_init()
| KINC_FUNC void kinc_g1_init |
( |
int | width, |
|
|
int | height ) |
Initializes the G1-API.
- Parameters
-
| width | The width to be used by the G1-API - typically the window-width |
| height | The height to be used by the G1-API - typically the window-height |
◆ kinc_g1_set_pixel()
| KINC_FUNC void kinc_g1_set_pixel |
( |
int | x, |
|
|
int | y, |
|
|
float | red, |
|
|
float | green, |
|
|
float | blue ) |
Sets a single pixel to a color.
- Parameters
-
| x | The x-component of the pixel-coordinate to set |
| y | The y-component of the pixel-coordinate to set |
| red | The red-component between 0 and 1 |
| green | The green-component between 0 and 1 |
| blue | The blue-component between 0 and 1 |
◆ kinc_g1_set_texture_magnification_filter()
| KINC_FUNC void kinc_g1_set_texture_magnification_filter |
( |
kinc_g1_texture_filter_t | filter | ) |
|
Set the texture-sampling-mode for upscaled textures.
- Parameters
-
| unit | The texture-unit to set the texture-sampling-mode for |
| filter | The mode to set |
◆ kinc_g1_set_texture_minification_filter()
| KINC_FUNC void kinc_g1_set_texture_minification_filter |
( |
kinc_g1_texture_filter_t | filter | ) |
|
Set the texture-sampling-mode for downscaled textures.
- Parameters
-
| unit | The texture-unit to set the texture-sampling-mode for |
| filter | The mode to set |
◆ kinc_g1_set_texture_mipmap_filter()
| 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 neighbouring mipmaps are linearly interpolated.
- Parameters
-
| unit | The texture-unit to set the mipmap-sampling-mode for |
| filter | The mode to set |
◆ kinc_g1_width()
| KINC_FUNC int kinc_g1_width |
( |
void | | ) |
|
Returns the width used by G1.
- Returns
- The width