Kode / Kinc

Modern low level game library and hardware abstraction.
http://kinc.tech
zlib License
511 stars 121 forks source link

overridable g1 texture filters #873

Closed sh-dave closed 4 months ago

sh-dave commented 4 months ago

Is g1 expected to be used with render targets, or is it more of an example and you expect users to do the rendering into the framebuffer manually?

With this PR it's possible to override the texture filter settings via extern declarations.

extern kinc_g4_texture_filter_t kinc_internal_g1_texture_minf;
extern kinc_g4_texture_filter_t kinc_internal_g1_texture_magf;

int main(...) {
...
  kinc_internal_g1_texture_minf = KINC_G4_TEXTURE_FILTER_POINT;
  kinc_internal_g1_texture_magf = KINC_G4_TEXTURE_FILTER_POINT;
...
}

I'm currently just playing a bit with the render targets, so feel free to just close this if it doesn't fit.

RobDangerous commented 4 months ago

"internal" means please only touch this internally so that doesn't quite fit. Making it fit for render-target use would be nice though.

sh-dave commented 4 months ago

Ok, added some setter functions. Not sure if the separate enum is overkill, but it felt kinda weird to include and use G4 types in the public api.

RobDangerous commented 4 months ago

It's good like that with those enums. And it's going in, thanks!