Cubemap class

This commit is contained in:
MihailRis 2024-03-07 13:40:38 +03:00
parent 87edb1d45e
commit eefd327845
10 changed files with 105 additions and 41 deletions

19
src/graphics/gl_util.h Normal file
View file

@ -0,0 +1,19 @@
#ifndef GRAPHICS_GL_UTIL_H_
#define GRAPHICS_GL_UTIL_H_
#include <GL/glew.h>
#include "ImageData.h"
namespace gl {
inline GLenum to_gl_format(ImageFormat imageFormat) {
switch (imageFormat) {
case ImageFormat::rgb888: return GL_RGB;
case ImageFormat::rgba8888: return GL_RGBA;
default:
return 0;
}
}
}
#endif // GRAPHICS_GL_UTIL_H_