mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-16 04:32:29 +00:00
chore: initial commit
This commit is contained in:
commit
70b00c5c38
965 changed files with 264882 additions and 0 deletions
22
src/gx/gll/GLUtil.cpp
Normal file
22
src/gx/gll/GLUtil.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include "gx/gll/GLUtil.h"
|
||||
#include "util/BlizzardCore.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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue