Horde3D http://horde3d.org/forums/ |
|
Broken cubemap mipmaps http://horde3d.org/forums/viewtopic.php?f=3&t=1512 |
Page 1 of 1 |
Author: | jacereda [ 22.04.2011, 20:49 ] |
Post subject: | Broken cubemap mipmaps |
Hi, I noticed a problem generating cubemap mipmaps on OSX. According to http://www.opengl.org/sdk/docs/man3/xht ... Mipmap.xml: Quote: GL_INVALID_OPERATION is generated if target is GL_TEXTURE_CUBE_MAP and the texture bound to the GL_TEXTURE_CUBE_MAP target of the active texture unit is not cube complete. A possible fix: Code: Index: Horde3D/Source/Horde3DEngine/egRendererBase.cpp
=================================================================== --- Horde3D/Source/Horde3DEngine/egRendererBase.cpp (revision 763) +++ Horde3D/Source/Horde3DEngine/egRendererBase.cpp (working copy) @@ -466,12 +466,8 @@ inputFormat, inputType, pixels ); } - if( tex.genMips ) - { - glEnable( tex.type ); // Workaround for ATI driver bug + if( tex.genMips && ( tex.type != GL_TEXTURE_CUBE_MAP || slice == 5 ) ) glGenerateMipmapEXT( tex.type ); - glDisable( tex.type ); - } glBindTexture( tex.type, 0 ); if( _texSlots[15].texObj ) |
Author: | marciano [ 25.04.2011, 18:22 ] |
Post subject: | Re: Broken cubemap mipmaps |
Good finding, thank you! The patch assumes that the 6th cube face is always uploaded last but that's a reasonable assumption. Unfortunately the ATI workaround can't be removed yet as even recent drivers still seem to have some issues. |
Author: | jacereda [ 26.04.2011, 13:40 ] |
Post subject: | Re: Broken cubemap mipmaps |
marciano wrote: Unfortunately the ATI workaround can't be removed yet as even recent drivers still seem to have some issues. I do have an ATI and that works for me, but I think Apple uses its own drivers... In any case, are those issues happening with any texture or just with cubemaps? |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |