| 21 | } |
| 22 | |
| 23 | GLTexture::GLTexture(GLenum type, int width, int height, GLenum internalFormat) |
| 24 | : type_(type) |
| 25 | { |
| 26 | glCreateTextures(type, 1, &handle_); |
| 27 | glTextureParameteri(handle_, GL_TEXTURE_MAX_LEVEL, 0); |
| 28 | glTextureParameteri(handle_, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 29 | glTextureParameteri(handle_, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
| 30 | glTextureStorage2D(handle_, getNumMipMapLevels2D(width, height), internalFormat, width, height); |
| 31 | } |
| 32 | |
| 33 | /// Draw a checkerboard on a pre-allocated square RGB image. |
| 34 | uint8_t* genDefaultCheckerboardImage(int* width, int* height) |
nothing calls this directly
no test coverage detected