Re: [PyOpenGL-Users] Code doesn't run on amd/ati hardware
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@vr...> - 2013-01-15 17:21:57
|
On 13-01-15 11:57 AM, Tomasz Wesołowski wrote:
> Hello,
>
> On 15 January 2013 15:51, Mike C. Fletcher <mcf...@vr...> wrote:
>> Anyway, wrapping with a list should be fine, as it's what the API
>> actually expects.
> Just a little point- Wouldn't a .linesplit() on the string be more
> suitable than wrapping with a single-element list?
My understanding is that implementations are free to parse each element
within the set as a separate set of statements, while some
implementations decide to concat the whole and then parse it. Thus some
implementations (Intel) will accept a shader which is passed as a string
(which gets turned into N single-character strings), while others (ATI)
demand that each fragment be a valid set of statements in GLSL.
That said, I can't readily point to a spec saying that's how it is
*supposed* to work, that just seems to be how it works in reality. The
shader fragments are null-terminated, not line-terminated, so there's no
reason I can see to use \n as a splitting character, and I'd rather not
introduce any arbitrary changes there. Particularly thinking of things
like this:
matrix = [
...
];
which would, I'm guessing, blow up on any of the finicky implementations
if we did line-by-line splits.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|