Add asserts to catch issue early
This commit is contained in:
parent
2d847cb6b9
commit
45f9cc20d9
@ -1769,6 +1769,8 @@ static void testSH(unsigned char *color[6], size_t width, size_t height,
|
|||||||
*/
|
*/
|
||||||
GLuint generateCubeMapFromTextures(const std::vector<video::ITexture *> &textures)
|
GLuint generateCubeMapFromTextures(const std::vector<video::ITexture *> &textures)
|
||||||
{
|
{
|
||||||
|
assert(textures.size() == 6);
|
||||||
|
|
||||||
GLuint result;
|
GLuint result;
|
||||||
glGenTextures(1, &result);
|
glGenTextures(1, &result);
|
||||||
|
|
||||||
@ -1813,6 +1815,7 @@ void IrrDriver::generateSkyboxCubemap()
|
|||||||
{
|
{
|
||||||
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
||||||
|
|
||||||
|
assert(SkyboxTextures.size() == 6);
|
||||||
SkyboxCubeMap = generateCubeMapFromTextures(SkyboxTextures);
|
SkyboxCubeMap = generateCubeMapFromTextures(SkyboxTextures);
|
||||||
const unsigned texture_permutation[] = { 2, 3, 0, 1, 5, 4 };
|
const unsigned texture_permutation[] = { 2, 3, 0, 1, 5, 4 };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user