Re: Code doesn't run on amd/ati hardware

"Mike C. Fletcher" <[email protected]> Tue, 15 Jan 2013 12:21:39 -0500
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
On 13-01-15 11:57 AM, Tomasz WesoĊ‚owski wrote:
> Hello,
>
> On 15 January 2013 15:51, Mike C. Fletcher <[email protected]> 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


------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users