mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
Cubemap class
This commit is contained in:
parent
87edb1d45e
commit
eefd327845
10 changed files with 105 additions and 41 deletions
19
src/graphics/gl_util.h
Normal file
19
src/graphics/gl_util.h
Normal 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_
|
||||
Loading…
Add table
Add a link
Reference in a new issue