mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-10-29 07:16:05 +03:00
23 lines
492 B
C++
23 lines
492 B
C++
#include "gx/gll/GLUtil.h"
|
|
#include <bc/Debug.hpp>
|
|
|
|
uint32_t GLLTextureTypeToIndex(GLEnum textureType) {
|
|
uint32_t index;
|
|
|
|
if (textureType == GL_TEXTURE_2D) {
|
|
index = 0;
|
|
} else if (textureType == GL_TEXTURE_3D) {
|
|
index = 1;
|
|
} else if (textureType == GL_TEXTURE_CUBE_MAP) {
|
|
index = 2;
|
|
} else if (textureType == GL_TEXTURE_RECTANGLE_EXT) {
|
|
index = 3;
|
|
} else {
|
|
index = 5;
|
|
|
|
BLIZZARD_ASSERT(false);
|
|
}
|
|
|
|
return index;
|
|
}
|