Jump to content
  • Advertisement
Sign in to follow this  

GL_TEXTURE_2D Array glGenerateMipmaps.

This topic is 2083 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When i use GL_TEXTURE_2D Array with glGenerateMipmaps and call glTexImage3D to generate an set of 2d texture array with automatic mipmaps. It never generate any of the mipmaps for the set of 2d textures. I did a test where i change the depth value of glTexImage3D then it generate the mipmap based on the depth which makes no sense. Have anyone ever run into this problem before. I though that each individual mipmaps could generate their own set of mipmaps and that it is not based of the depth.


This is how i am setting it up.

    int bufferSize = w*h*numChannels*sizeofEachComponent*d;
    unsigned char* arrayData = new unsigned char[bufferSize];
    for(GLuint depthIndex = 0; depthIndex < pDesc->ArraySize; depthIndex++)
      const void* currentResourceData = (pInitialData) ? pInitialData[depthIndex].pSysMem:NULL;
        int oneLayer = w*h*numChannels*sizeofEachComponent;
        unsigned char* memoryLocation = &arrayData[oneLayer*depthIndex];


So when i test the code in CodeXL it tells me there is no mipmpas generated for the glTexdImage3D, but when i set the depth to a different value than 1 then it generate mipmaps. It seems to me that for 3D textues mipmaps are generated based on depth which makes sense, but for Texture2D_ARRAY it does not.




Edited by BornToCode

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!