Mercurial > molko
comparison src/libmlk-core/core/texture.c @ 421:3edda1ce314c
core: remove mlk_ prefix for now
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 13 Oct 2022 20:56:42 +0200 |
parents | 1b4e61bdb9ab |
children | 63ebfa352ae1 |
comparison
equal
deleted
inserted
replaced
420:7d2ebc334c8c | 421:3edda1ce314c |
---|---|
25 #include "texture_p.h" | 25 #include "texture_p.h" |
26 #include "util.h" | 26 #include "util.h" |
27 #include "window.h" | 27 #include "window.h" |
28 #include "window_p.h" | 28 #include "window_p.h" |
29 | 29 |
30 enum mlk_err | 30 int |
31 texture_new(struct texture *tex, unsigned int w, unsigned int h) | 31 texture_new(struct texture *tex, unsigned int w, unsigned int h) |
32 { | 32 { |
33 assert(tex); | 33 assert(tex); |
34 assert(w); | 34 assert(w); |
35 assert(h); | 35 assert(h); |
37 tex->handle = SDL_CreateTexture(RENDERER(), | 37 tex->handle = SDL_CreateTexture(RENDERER(), |
38 SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h); | 38 SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h); |
39 | 39 |
40 if (!tex->handle) { | 40 if (!tex->handle) { |
41 tex->w = tex->h = 0; | 41 tex->w = tex->h = 0; |
42 return MLK_ERR_INTERNAL; | 42 return ERR_INTERNAL; |
43 } | 43 } |
44 | 44 |
45 tex->w = w; | 45 tex->w = w; |
46 tex->h = h; | 46 tex->h = h; |
47 | 47 |