[GEM-dev] mipmap support for pix_texture

Claude Heiland-Allen claude at mathr.co.uk
Tue Mar 26 04:09:00 CET 2013


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
-- 
http://mathr.co.uk


More information about the GEM-dev mailing list