MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / makeArrayTextureInternal

Method makeArrayTextureInternal

Source/Graphics/textures.cpp:1772–1792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1770}
1771
1772unsigned int Textures::makeArrayTextureInternal(unsigned int num_slices, unsigned char flags) {
1773 unsigned which = AllocateFreeSlot();
1774
1775 Texture& texture = textures[which];
1776 texture.Init();
1777 texture.num_slices = 0;
1778 texture.sub_textures.reserve(num_slices);
1779 texture.use_srgb = (flags & PX_SRGB) != 0;
1780 texture.no_mipmap = (flags & PX_NOMIPMAP) != 0;
1781 texture.no_reduce = (flags & PX_NOREDUCE) != 0;
1782 texture.no_live_update = (flags & PX_NOLIVEUPDATE) != 0;
1783 ;
1784
1785 texture.wrap_s = m_wrap_s;
1786 texture.wrap_t = m_wrap_t;
1787 texture.min_filter = min_filter;
1788 texture.mag_filter = mag_filter;
1789 texture.tex_target = GL_TEXTURE_2D_ARRAY;
1790
1791 return which;
1792}
1793
1794unsigned int Textures::makeCubemapArrayTextureInternal(int num_slices, int width, int height, GLint internal_format, GLint format, unsigned char flags) {
1795 unsigned which = AllocateFreeSlot();

Callers

nothing calls this directly

Calls 2

InitMethod · 0.45
reserveMethod · 0.45

Tested by

no test coverage detected