Hi!
I tried adding mipmap support, with some success. Patch against current git attached. Activate it by sending [rectangle 0, quality 2( to [pix_texture]. Results will have glitchy edges if your image is NPOT (not a power of two size in each dimension), but it does looks a lot better for POT images - far less aliasing when the displayed size is smaller than the image size:
http://mathr.co.uk/misc/2013-03-26_pd-gem_mipmap.png
(from left to right: nearest, linear, linear_mipmap_linear)
There are still some bugs, in particular relating to sharing textures between multiple [pix_texture] objects - not sure what's going on there (I'm not too familiar with Gem internals). I'm also not sure which version of OpenGL introduced glGenerateMipmap(), maybe that needs checking at runtime to avoid crashes?
(Also some weirdness with my fresh git clone in that 'git add help/pix_texture-help.pd' did precisely nothing, so I attached my modified version too.)
Hopefully this is useful,
Claude
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-03-26 04:09, Claude Heiland-Allen wrote:
Hi!
thanks for the patch. i included it.
There are still some bugs, in particular relating to sharing textures between multiple [pix_texture] objects - not sure what's going on there (I'm not too familiar with Gem internals). I'm also not sure which version of OpenGL introduced glGenerateMipmap(), maybe that needs checking at runtime to avoid crashes?
i think glGenerateMipmap is part of the GL_ARB_framebuffer_object extension.
(Also some weirdness with my fresh git clone in that 'git add help/pix_texture-help.pd' did precisely nothing, so I attached my modified version too.)
the reason is most likely that the help-patch has not been modified. (at least, when i do a diff between your attached file and the one in my repository, they seemed to be the same)
fgamsdr IOhannes
On 26/03/13 08:44, IOhannes m zmoelnig wrote:
thanks for the patch. i included it.
Great :)
i think glGenerateMipmap is part of the GL_ARB_framebuffer_object extension.
Yes - did a little looking today and that extension supercedes GL_EXT_framebuffer_object which originally defined it. It's a core extension in OpenGL 3.0.
the reason is most likely that the help-patch has not been modified.
Ah so it is - I must have reinstalled Gem in between editing the file and copying it back into Gem source dir, thus my changes were lost...
I recreated them and attached: * document GL_LINEAR MIPMAP_LINEAR / POT in introduction * remove SGI speed comment in introduction for space reasons * replace toggle with hradio 3 for quality message * document quality 2 for inlet 1
Claude
hello,
this look promissing, but i've got an error compilling the last git revision :
pix_texture.cpp:262:18: error: 'm_canMipMap' was not declared in this scope make[3]: *** [libPixes_la-pix_texture.lo] Erreur 1
I have changed m_canMipMap to m_canMipmap and it compile. everything look like working as it should.
Cyrille
Le 26/03/2013 16:24, Claude Heiland-Allen a écrit :
On 26/03/13 08:44, IOhannes m zmoelnig wrote:
thanks for the patch. i included it.
Great :)
i think glGenerateMipmap is part of the GL_ARB_framebuffer_object extension.
Yes - did a little looking today and that extension supercedes GL_EXT_framebuffer_object which originally defined it. It's a core extension in OpenGL 3.0.
the reason is most likely that the help-patch has not been modified.
Ah so it is - I must have reinstalled Gem in between editing the file and copying it back into Gem source dir, thus my changes were lost...
I recreated them and attached:
- document GL_LINEAR MIPMAP_LINEAR / POT in introduction
- remove SGI speed comment in introduction for space reasons
- replace toggle with hradio 3 for quality message
- document quality 2 for inlet 1
Claude
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-03-26 22:45, Cyrille Henry wrote:
hello,
this look promissing, but i've got an error compilling the last git revision :
pix_texture.cpp:262:18: error: 'm_canMipMap' was not declared in this scope make[3]: *** [libPixes_la-pix_texture.lo] Erreur 1
I have changed m_canMipMap to m_canMipmap and it compile. everything look like working as it should.
doh! i thought i had run a test compilation (but obviously i didn't wait for it to return successfully...)
fixed and pushed.
fgmasdf IOhannes