MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / init

Method init

Engine/source/gfx/gl/gfxGLTextureArray.cpp:12–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12void GFXGLTextureArray::init()
13{
14 PRESERVE_2D_TEXTURE_ARRAY();
15 glGenTextures(1, &mTextureArray);
16 glBindTexture(GL_TEXTURE_2D_ARRAY, mTextureArray);
17 glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, mMin(mMipLevels - 1, 1));
18 glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
19 glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
20 glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
21 glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
22
23 glTexStorage3D(GL_TEXTURE_2D_ARRAY, mMipLevels, GFXGLTextureInternalFormat[mFormat], mWidth, mHeight, mArraySize);
24}
25
26void GFXGLTextureArray::_setTexture(const GFXTexHandle& texture, U32 slot)
27{

Callers

nothing calls this directly

Calls 1

mMinFunction · 0.85

Tested by

no test coverage detected