| 1432 | } |
| 1433 | |
| 1434 | unsigned int Textures::makeTextureInternal(const TextureData& texture_data) { |
| 1435 | CHECK_GL_ERROR(); |
| 1436 | unsigned which = AllocateFreeSlot(); |
| 1437 | |
| 1438 | TextureData* texture_data_ptr = new TextureData(texture_data); |
| 1439 | textures[which].Init(); |
| 1440 | textures[which].sub_textures.resize(1); |
| 1441 | textures[which].sub_textures[0].texture_data = texture_data_ptr; |
| 1442 | textures[which].width = texture_data.GetWidth(); |
| 1443 | textures[which].height = texture_data.GetHeight(); |
| 1444 | |
| 1445 | textures[which].wrap_s = m_wrap_s; |
| 1446 | textures[which].wrap_t = m_wrap_t; |
| 1447 | textures[which].min_filter = min_filter; |
| 1448 | textures[which].mag_filter = mag_filter; |
| 1449 | |
| 1450 | textures[which].no_mipmap = true; |
| 1451 | |
| 1452 | textures[which].internal_format = texture_data.GetGLInternalFormat(); |
| 1453 | textures[which].format = texture_data.GetGLBaseFormat(); |
| 1454 | textures[which].tex_target = GL_TEXTURE_2D; |
| 1455 | |
| 1456 | TextureToVRAM(which); |
| 1457 | |
| 1458 | return which; |
| 1459 | } |
| 1460 | |
| 1461 | TextureRef Textures::makeTexture(const TextureData& texture_data) { |
| 1462 | PROFILED_TEXTURE_MUTEX_LOCK |
nothing calls this directly
no test coverage detected