TextureFormat.h 666 B

123456789101112131415161718192021222324
  1. #ifndef TEXTUREDATA_H
  2. #define TEXTUREDATA_H
  3. #include <GL/glew.h>
  4. struct TextureFormat final {
  5. GLint internalformat;
  6. GLenum format;
  7. GLenum type;
  8. bool linear;
  9. bool depth;
  10. static TextureFormat color8(int channels, bool linear = false);
  11. static TextureFormat float16(int channels, bool linear = false);
  12. static TextureFormat float32(int channels, bool linear = false);
  13. static TextureFormat depth16(bool linear = false);
  14. static TextureFormat depth32(bool linear = false);
  15. static TextureFormat unknown();
  16. private:
  17. TextureFormat(GLint internalformat, GLenum format, GLenum type, bool linear, bool depth = false);
  18. };
  19. #endif