delete surface from texture raws
| 107 | |
| 108 | // delete surface from texture raws |
| 109 | static void delete_texture(long texpos) { |
| 110 | std::lock_guard<std::mutex> lg_add_texture(g_adding_mutex); |
| 111 | auto pos = static_cast<size_t>(texpos); |
| 112 | if (pos >= enabler->textures.raws.size()) |
| 113 | return; |
| 114 | enabler->textures.raws[texpos] = NULL; |
| 115 | } |
| 116 | |
| 117 | // create new surface with RGBA32 format and pixels as data |
| 118 | SDL_Surface* create_texture(std::vector<uint32_t>& pixels, int texture_px_w, int texture_px_h) { |