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

Method GL46TextureCube

GTE/Graphics/GL46/GL46TextureCube.cpp:17–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17GL46TextureCube::GL46TextureCube(TextureCube const* texture)
18 :
19 GL46TextureArray(texture, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BINDING_CUBE_MAP)
20{
21 // Create a texture structure.
22 glGenTextures(1, &mGLHandle);
23 glBindTexture(GL_TEXTURE_CUBE_MAP, mGLHandle);
24
25 // Allocate (immutable) texture storage for all levels.
26 auto const width = texture->GetDimension(0);
27 auto const height = texture->GetDimension(1);
28 glTexStorage2D(GL_TEXTURE_CUBE_MAP, mNumLevels, mInternalFormat, width, height);
29
30 Initialize();
31
32 // Cannot leave this texture bound.
33 glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
34
35 // Create a staging texture if requested.
36 CreateStaging();
37}
38
39std::shared_ptr<GEObject> GL46TextureCube::Create(void*, GraphicsObject const* object)
40{

Callers

nothing calls this directly

Calls 4

glGenTexturesFunction · 0.85
glBindTextureFunction · 0.85
glTexStorage2DFunction · 0.85
GetDimensionMethod · 0.45

Tested by

no test coverage detected