When I scale the window, SDL simply ignores the resolution I set and draw diagonals on my pixels.
It's SDL2, Im using SDL_RenderGeometry to draw my triangles.
Here's how I create the window:
static inline void canvas_init(Canvas* canvas) {
SDL_CreateWindowAndRenderer(canvas->width * canvas->scale_x, canvas->height * canvas->scale_y, 0, &(canvas->window), &(canvas->renderer));
SDL_RenderSetScale(canvas->renderer, canvas->scale_x, canvas->scale_y);
SDL_Init(SDL_INIT_VIDEO);
}
I tried something about creating a backbuffer but I probably did it wrong and it didn't work with no errors.
Here is what I'm currently getting on a windows which were supposed to have 10 pixels clearly theres a diagonal on some pixels
Thank you comments guy, it's working by doing this
Creating a lowres texture, draw to it, but before displaying it, copy this to the window texture