[PD] GLSL example trouble in pd extended (ati Radeon 9600 hardware and win os)

IOhannes m zmoelnig zmoelnig at iem.at
Thu Feb 21 09:23:24 CET 2008


Roman Haefeli wrote:
> On Wed, 2008-02-20 at 14:59 +0300, Vadim Smahtin wrote:
>> Hi. I trying to learn some about glsl shaders in pd. And when i trying
>> to load "toon.vert" (18.gl_shading_language) i usually get this-
>>
>> "[glsl_vertex]: Loaded file: E:/Program Files/pd/doc/examples/Gem/data/Toon.vert
>> linking: link 1.07374e+009 0
> 
> this ID is too long to be represented correctly in pd's 32bit floating
> point number format. it is rounded to ~6 digits so the link ID pd is
> giving is wrong . 
> 
> AFAIR, i heard someone fixed that problem (can't recall how and who) and
> i think it would be nice to have the fix discussed here, so that it's
> searchable in the list archives. i hope i am not requesting something
> that is already there. sorry, if this is the case.
there is a ticket in the pd-gem bug-tracker.

i think i fixed it yesterday.

the fix now involves reinterpretative casts between t_float and GLuint 
(which are both 32bit), resulting in "non-human-readable" IDs, but 
everything should work ok now.

while it is debatable whether reinterpretative casts are the most 
elegant solution (i don't think so), it was the simplest solution to 
make it work (patch-compatibility!; smallest amount of changed lines; no 
overhead introduced where we have to keep track of valid IDs ourselfs).
if it works (test!), i will not change it until it breaks something :-)

fgamsdr
IOhannes





More information about the Pd-list mailing list