Hello! Is there a way to get access to different mipmap levels using SOIL_load_image()?
The code below crashes the app:
int width, height, mipMapLeveCount;
unsigned char* imageDataPtr =SOIL_load_image( "texture/checker.dds", &width, &height, &mipMapLeveCount, SOIL_LOAD_RGB);
unsigned char* tempPtr=imageDataPtr;
for(int mipmapLevel = 0; mipmapLevel < mipMapLeveCount; mipmapLevel++)
{
glTexImage2D( GL_TEXTURE_2D, mipmapLevel, GL_RGB, width, height, 0, GL_RGB,GL_UNSIGNED_BYTE, imageDataPtr );
imageDataPtr+=width*height*3;
width/=2;
height/=2;
}
SOIL_free_image_data( tempPtr );

Find content
Not Telling