piu errori

This commit is contained in:
Alessandro Mauri 2023-02-23 01:23:21 +01:00
parent 4939fd7068
commit 884d5a1987
No known key found for this signature in database
GPG key ID: 2B7BF9531FF03BE8
5 changed files with 111 additions and 91 deletions

View file

@ -1,5 +1,6 @@
#include <SDL2/SDL.h>
#include <SDL2/SDL_events.h>
#include <SDL2/SDL_video.h>
#include <stdlib.h>
#include <stdio.h>
@ -29,6 +30,18 @@ int main(void)
SDL_WaitEvent(&e);
if (e.type == SDL_QUIT)
break;
if (e.type == SDL_WINDOWEVENT) {
switch (e.window.event) {
case SDL_WINDOWEVENT_RESIZED:
case SDL_WINDOWEVENT_SIZE_CHANGED:
ren_update_viewport(e.window.data1, e.window.data2);
case SDL_WINDOWEVENT_EXPOSED:
ren_render_text("ciao mamma", 0, 0, 100, 100, 12);
SDL_GL_SwapWindow(win);
break;
default: break;
}
}
}
ren_free();