mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
19 lines
432 B
C++
19 lines
432 B
C++
#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_
|