MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / LoadTextureLevel

Method LoadTextureLevel

GTE/Graphics/GL46/GL46Texture2Array.cpp:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void GL46Texture2Array::LoadTextureLevel(uint32_t item, uint32_t level, void const* data)
59{
60 auto texture = GetTexture();
61 if (texture && level < texture->GetNumLevels())
62 {
63 auto const width = texture->GetDimensionFor(level, 0);
64 auto const height = texture->GetDimensionFor(level, 1);
65
66 // For Texture2Array, use the 3D calls where the slice (or item) is
67 // the third dimension. Only updating one slice for the specified
68 // level.
69 glTexSubImage3D(GL_TEXTURE_2D_ARRAY, level, 0, 0, item, width, height, 1,
70 mExternalFormat, mExternalType, data);
71 }
72}
73
74

Callers

nothing calls this directly

Calls 3

glTexSubImage3DFunction · 0.85
GetNumLevelsMethod · 0.80
GetDimensionForMethod · 0.80

Tested by

no test coverage detected