| 15 | } |
| 16 | |
| 17 | GL46Texture1Array::GL46Texture1Array(Texture1Array const* texture) |
| 18 | : |
| 19 | GL46TextureArray(texture, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BINDING_1D_ARRAY) |
| 20 | { |
| 21 | // Create a texture structure. |
| 22 | glGenTextures(1, &mGLHandle); |
| 23 | glBindTexture(GL_TEXTURE_1D_ARRAY, mGLHandle); |
| 24 | |
| 25 | // Allocate (immutable) texture storage for all levels. |
| 26 | auto const length = texture->GetDimension(0); |
| 27 | auto const numItems = texture->GetNumItems(); |
| 28 | glTexStorage2D(GL_TEXTURE_1D_ARRAY, mNumLevels, mInternalFormat, length, numItems); |
| 29 | |
| 30 | Initialize(); |
| 31 | |
| 32 | // Cannot leave this texture bound. |
| 33 | glBindTexture(GL_TEXTURE_1D_ARRAY, 0); |
| 34 | |
| 35 | // Create a staging texture if requested. |
| 36 | CreateStaging(); |
| 37 | } |
| 38 | |
| 39 | std::shared_ptr<GEObject> GL46Texture1Array::Create(void*, GraphicsObject const* object) |
| 40 | { |
nothing calls this directly
no test coverage detected