[GEM-dev] [ pd-gem-Bugs-1883795 ] shader IDs break when converted to float
SourceForge.net
noreply at sourceforge.net
Thu Jan 31 19:47:24 CET 2008
Bugs item #1883795, was opened at 2008-01-31 18:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=507079&aid=1883795&group_id=64325
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: ClaudiusMaximus (claudiusmaximus)
Assigned to: Nobody/Anonymous (nobody)
Summary: shader IDs break when converted to float
Initial Comment:
The problem:
Shaders don't work, linking fails.
The reason:
Mathieu Bouchard wrote:
> On Mon, 7 Jan 2008, cyrille henry wrote:
>> i remember a problem i had once with long shader id. the Id was to
>> long, pd converted it to exponentian notation (1234e+7), so some
>> precision was lost.
>
> Until the ID gets over 16777216, it is ok
I just did a quick test in C++, seems my shader ID's are indeed too big for 32bit float.
int|float: 16777216
Shader ID: 536870913
Shader ID: 2147483649
Possible solutions:
1. use symbols instead of floats
2. use small floats with an internal map from id -> real id
3. split shader ids into as many floats as necessary
I prefer solution 2, as it doesn't change the externally visible interface to the Pd user.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=507079&aid=1883795&group_id=64325
More information about the GEM-dev
mailing list