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

Method LoadTextureLevel

GTE/Graphics/GL46/GL46TextureCube.cpp:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void GL46TextureCube::LoadTextureLevel(uint32_t item, uint32_t level, void const* data)
58{
59 auto texture = GetTexture();
60 if (texture && level < texture->GetNumLevels())
61 {
62 auto const width = texture->GetDimension(0);
63 auto const height = texture->GetDimension(1);
64
65 // Each face in the TextureCube has a unique GL target.
66 GLenum targetFace = msCubeFaceTarget[item];
67
68 glTexSubImage2D(targetFace, level, 0, 0, width, height,
69 mExternalFormat, mExternalType, data);
70 }
71}
72
73

Callers

nothing calls this directly

Calls 3

glTexSubImage2DFunction · 0.85
GetNumLevelsMethod · 0.80
GetDimensionMethod · 0.45

Tested by

no test coverage detected