| 36 | } |
| 37 | |
| 38 | inline void SetUnpackAlignement(UInt8 bpp) |
| 39 | { |
| 40 | if (bpp % 8 == 0) |
| 41 | glPixelStorei(GL_UNPACK_ALIGNMENT, 8); |
| 42 | else if (bpp % 4 == 0) |
| 43 | glPixelStorei(GL_UNPACK_ALIGNMENT, 4); |
| 44 | else if (bpp % 2 == 0) |
| 45 | glPixelStorei(GL_UNPACK_ALIGNMENT, 2); |
| 46 | else |
| 47 | glPixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | Texture::Texture(ImageType type, PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth, UInt8 levelCount) |