[GEM-dev] more textCoord fun

chris clepper cgc at humboldtblvd.com
Fri Sep 2 04:59:58 CEST 2005


This happens because pix_coordinate nulls the texture coordinates in  
it's postrender method.  I have no idea why it does this since it  
does not create or properly deallocate texture coordinates.  It's  
also probably a good way to have another memory leak since setting a  
pointer to NULL without freeing memory is the one half of the memory  
leak equation.

I just commented out both lines in pix_coordinate :: postrender and  
it still seems to work fine.  I won't commit the change until I test  
it more and/or hear from someone that this is not breaking something  
else.

cgc

On Aug 31, 2005, at 3:06 PM, B. Bogart wrote:

> Hey all,
>
> I realized some weirdness with textcoords in my patch the spreads one
> texture over many geos.
>
> My chain looks something like this:
>
> [gemhead]
> [pix_image]   [loadbang]
> [pix_texture]-[mode 0, repeat 1 <
> [s group]
>
> Then there are 40x30 geos each with:
>
> [r group]
> [pix_coordinate]
> [separator]
> [square]
>
> I've moved separator AFTER pix_coordinate as per cgc's  
> instructions. As
> far as I know this is odd in Gem, since the pix_coordinate for each
> square is before the seperator they may interfere?
>
> Anyhow When I just this patch the text-cords are all screwed up,
> (shifted slightly, actually looks like they are doing square texturing
> when they should be doing rectangular). Even once I send the proper
> coordinates using my python script.
>
> In order to get everything to display right what I need to do is load
> the patch and then manually reinstanciate the pix_texture (clearing  
> the
> texture) and then reloading it with pix_image.
>
> Actually now that I think of it that is effectively removing the "mode
> 0, repeat 1" thing. Hmmm, actually I don't need to set "mode 0, repeat
> 1" now that I put separator after pix_coordinate...
>
> Anyhow I answered by own question, maybe someone can enlighten me  
> as to
> why this is happening.
>
> Thanks all.
>
> b>
> _______________________________________________
> GEM-dev mailing list
> GEM-dev at iem.at
> http://lists.puredata.info/listinfo/gem-dev
>





More information about the GEM-dev mailing list