Hallo allemaal,
Ik ben op dit moment bezig met het ontwikkelen van een OpenGL-programma dat gebruik maakt van de "wgl_arb_render_texture"-extensie om een scene naar een textuur te renderen en dat vervolgens van deze textuur gebruik maakt nadat de "GL_SGIS_generate_mipmap"-extensie automatisch de benodigde mipmapniveaus voor de textuur heeft gegenereerd. En bij dit laatste gaat het mis: alhoewel er duidelijk mipmapniveaus gegenereerd worden, is een van de kleinere mipmaps gecorrumpeerd ("corrupted" als je "gecorrumpeerd" - ongeacht het feit dat dit het correcte Nederlandse woord ervoor is - raar vindt klinken
). Voor hen die op dit moment het idee hebben dat ze iets dergelijks ook al eens mee hebben gemaakt (of voor hen die "gewoon" nieuwsgierig zijn), hier het volledige verhaal (ik heb de versie overgenomen die ik ook op FlipCode / GameDev heb gepost):
<PASTE>
I'm currently writing an OpenGL application that uses the wgl_arb_render_texture extension to render a scene to a texture and subsequently uses that texture in two different OpenGL rendering windows (two different OpenGL contexts). So far no problems. I'm also using the GL_SGIS_generate_mipmap extension to automatically generate mipmaps whenever the texture base level (level 0) has been updated. When I activate this extension and take a look at my texture when scaling a quad to which the texture has been applied, it looks like the extension is doing its thing: when comparing the visual quality to the non-mipmapped (GL_LINEAR) version, I can clearly see that mipmaps are indeed generated and that blending between them (because of GL_LINEAR_MIPMAP_LINEAR) is indeed occuring, but there's a problem (at least on my Radeon 9800 Pro): one of the smaller mipmap textures is corrupted. The following screenshots demonstrate this corruption (generated by moving the lower-right ("Texture Settings - Scale") slider gradually to the left):
http://www.sickcrew.com/~inforum/mme/scale100.jpg (everything OK)
http://www.sickcrew.com/~inforum/mme/scale075.jpg
http://www.sickcrew.com/~inforum/mme/scale050.jpg
http://www.sickcrew.com/~inforum/mme/scale025.jpg
http://www.sickcrew.com/~inforum/mme/scale015.jpg
http://www.sickcrew.com/~inforum/mme/scale010.jpg (corruption starts)
http://www.sickcrew.com/~inforum/mme/scale009.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale008.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale007.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale006.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale005.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale004.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale003.jpg (corruption ends)
http://www.sickcrew.com/~inforum/mme/scale002.jpg
http://www.sickcrew.com/~inforum/mme/scale001.jpg
As you can clearly see, the corruption occurs at one of the in-between mipmap levels; the smallest level is OK again. Besides, I ran the program on a GeForce4 MX (440) and the flaw did not occur, so I started to think that it is, in fact, driver related; I updated my driver to the newest version (WinXP Catalyst 4.2), reset every driver option to its default setting, started my program, but the problem is still there. I've also checked to see that my Radeon 9800 Pro actually supports the GL_SGIS_generate_mipmap extension: no problem there.
You can download my program at http://www.sickcrew.com/~inforum/mme/SpotNice.zip to check the presence or absence of the flaw yourself (please let me know what happens and what videocard / driver / OS you're running). I really don't have a clue as to what is causing the error (besides a possible GL_SGIS_generate_mipmap related driver bug). Does anyone recognize this problem and/or have a possible solution to it (I know that I could use the (slower) gluBuild2DMipmaps() function instead, but I would really like to use the GL_SGIS_generate_mipmap extension; that's what it's there for)? Some help would be greatly appreciated. Thanks in advance.
</PASTE>
Als iemand een idee heeft wat hier aan de hand is, dan zou ik enige hulp ten zeerste weten te waarderen. Bij voorbaat dank.
Groeten,
(Sn)Ik.
Ik ben op dit moment bezig met het ontwikkelen van een OpenGL-programma dat gebruik maakt van de "wgl_arb_render_texture"-extensie om een scene naar een textuur te renderen en dat vervolgens van deze textuur gebruik maakt nadat de "GL_SGIS_generate_mipmap"-extensie automatisch de benodigde mipmapniveaus voor de textuur heeft gegenereerd. En bij dit laatste gaat het mis: alhoewel er duidelijk mipmapniveaus gegenereerd worden, is een van de kleinere mipmaps gecorrumpeerd ("corrupted" als je "gecorrumpeerd" - ongeacht het feit dat dit het correcte Nederlandse woord ervoor is - raar vindt klinken
<PASTE>
I'm currently writing an OpenGL application that uses the wgl_arb_render_texture extension to render a scene to a texture and subsequently uses that texture in two different OpenGL rendering windows (two different OpenGL contexts). So far no problems. I'm also using the GL_SGIS_generate_mipmap extension to automatically generate mipmaps whenever the texture base level (level 0) has been updated. When I activate this extension and take a look at my texture when scaling a quad to which the texture has been applied, it looks like the extension is doing its thing: when comparing the visual quality to the non-mipmapped (GL_LINEAR) version, I can clearly see that mipmaps are indeed generated and that blending between them (because of GL_LINEAR_MIPMAP_LINEAR) is indeed occuring, but there's a problem (at least on my Radeon 9800 Pro): one of the smaller mipmap textures is corrupted. The following screenshots demonstrate this corruption (generated by moving the lower-right ("Texture Settings - Scale") slider gradually to the left):
http://www.sickcrew.com/~inforum/mme/scale100.jpg (everything OK)
http://www.sickcrew.com/~inforum/mme/scale075.jpg
http://www.sickcrew.com/~inforum/mme/scale050.jpg
http://www.sickcrew.com/~inforum/mme/scale025.jpg
http://www.sickcrew.com/~inforum/mme/scale015.jpg
http://www.sickcrew.com/~inforum/mme/scale010.jpg (corruption starts)
http://www.sickcrew.com/~inforum/mme/scale009.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale008.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale007.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale006.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale005.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale004.jpg (corrupted)
http://www.sickcrew.com/~inforum/mme/scale003.jpg (corruption ends)
http://www.sickcrew.com/~inforum/mme/scale002.jpg
http://www.sickcrew.com/~inforum/mme/scale001.jpg
As you can clearly see, the corruption occurs at one of the in-between mipmap levels; the smallest level is OK again. Besides, I ran the program on a GeForce4 MX (440) and the flaw did not occur, so I started to think that it is, in fact, driver related; I updated my driver to the newest version (WinXP Catalyst 4.2), reset every driver option to its default setting, started my program, but the problem is still there. I've also checked to see that my Radeon 9800 Pro actually supports the GL_SGIS_generate_mipmap extension: no problem there.
You can download my program at http://www.sickcrew.com/~inforum/mme/SpotNice.zip to check the presence or absence of the flaw yourself (please let me know what happens and what videocard / driver / OS you're running). I really don't have a clue as to what is causing the error (besides a possible GL_SGIS_generate_mipmap related driver bug). Does anyone recognize this problem and/or have a possible solution to it (I know that I could use the (slower) gluBuild2DMipmaps() function instead, but I would really like to use the GL_SGIS_generate_mipmap extension; that's what it's there for)? Some help would be greatly appreciated. Thanks in advance.
</PASTE>
Als iemand een idee heeft wat hier aan de hand is, dan zou ik enige hulp ten zeerste weten te waarderen. Bij voorbaat dank.
Groeten,
(Sn)Ik.