opengl - Mipmap generation fails second time -


i have following situation: have material texture load file.in cases load image, create opengl texture , generate mipmaps.then render it.works fine when minimized.in other cases,i processing on texture after initial mipmaps generation.and because processing on level 0 regenerate mipmaps before returning renderer.the issue after second generation of mipmaps don't exist.the texture looks if has gl_nearest mag , min.i can't understand why doesn't work second time.here code generate mipmaps:

glbindtexture(gl_texture_2d,_id);    gltexparameteri  ( _target, gl_texture_base_level, 0 ); gltexparameteri(gl_texture_2d, gl_texture_min_filter, gl_linear_mipmap_linear);   gltexparameteri(gl_texture_2d, gl_texture_mag_filter, gl_linear);                        glgeneratemipmap(gl_texture_2d); glbindtexture(gl_texture_2d,0); 

my hardware nvidia quadro k4000 ,opengl 4.2

one more thing.in opengl debug output getting following warning:

state usage warning: texture 2 base level inconsistent.check texture size.severity:low ,id131204

i debugged gdebugger , shows number of mipmaps = 1 after second generation while after first generation 10.btw,second time different texture object got it's data initial texture.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -