graphics - what format of pic can genereate mimap in opengl-es -


as title, used use .dds, did work,now use type of .png, can generate mipmap? here functions using: glteximage2d(…).or maybe glubuild2dmipmaps(…) better choice?

dds image format contains precalculated mipmaps. far quality goes, precalculated mipmaps offer best quality, since can downsampled offline advanced filter kernels lancozs, without having care runtime efficiency.

png not contain additional mipmap levels have compute mipmaps @ runtime. should not use glubuild2dmipmaps this. 1 function known exhibit buggy behavior in conditions , furthermore unconditionally resample images power-of-2 dimensions, although since opengl-2 non power-of-2 dimensions fine texture images.

instead should load base level image glteximage2d(…) , use glgeneratemipmap(…) (available since opengl-3) build mipmap image pyramid there. if don't use opengl-3, can use sgis_generate_mipmap extension, if available.

however advised online mipmap generation may yield not results offline generation.

another possible approach use of jpeg2000 images; nature of jpeg2000 image encoding results in image pyramid being readily available. otoh jpeg2000 costly encode , decode.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -