View Full Version : GL_RGBA16F, glGenerateMipmaps
04-17-2007, 02:55 PM
Are there any known issues with nVidias drivers when calling glGenerateMipmapsEXT on a GL_RGBA16F_ARB texture that was rendered to right before?
I use glGetTexImage() to obtain the last 1x1 mipmap level contents of the texture but get bogus results... No GL error is thrown, though.
04-18-2007, 06:20 AM
NVIDIA: no problems with glGenerateMipmapsEXT, but it's faster to downsample yourself (every step downsamples 4x - 2x in the shader and 2x because of GL_LINEAR filter)
ATI: glGenerateMipmapsEXT crashed when used on 1024x1024 GL_RGBA16F_ARB texture. Again, I downsample myself, but 2x per step only (no GL_LINEAR support on ATI).
So, on both NVIDIA and ATI I prefer to downsample myself because it's more reliable on ATI and faster on NVIDIA.
In order to test if GPU supports GL_LINEAR on RGBA16F textures perform a test at beginning of application:
-use black-white chessboard texture (no grey colors - only black and white)
-measure time of rendering with GL_NEAREST
-measure time of rendering with GL_LINEAR - if it's not 5x slower then it's OK
-check if rendered image contains grey pixels
Such test also helps to select best method if GPU supports GL_LINEAR but is a bit slow with it - application will use GL_NEAREST and downsample using shader if GL_LINEAR is too slow.
04-18-2007, 07:40 AM
I guess, I´m experiencing this bug:
Bug with glGetTexImage (http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=3;t=013834#000000)
So, its a Problem with glGetTexImage, not with glGenerateMipmapsEXT
04-18-2007, 08:39 AM
Sounds likely - perhaps you could use glReadPixels instead. Or you can do the vertex texture thing I mentioned.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.