[osg-users] handling of #pragma line in Shader::_computeShaderDefines()

Robert Osfield robert.osfield at gmail.com
Thu Feb 25 09:39:29 PST 2016


Hi Andreas,

I'm struggling to understand what the issue is from your description, could
you provide the whole shader and describe what functionality you are
after?  This wider context would hopefully help me understand the issue at
hand.

Robert.

On 25 February 2016 at 17:17, Andreas Roth <osgforum at tevs.eu> wrote:

> Hi,
>
> I stumbled upon the Shader::_computeShaderDefines() function, which as far
> as i could understand should extract additional information from all line
> starting with #pragma. When a line is found it looks for the next opening
> brackets and analyze the text between the #pragma and the opening bracket.
> But when the #pragma line does not have a opening bracket but some
> following line has the analyzed text is wrong.
>
> For example use the following shader code:
>
> Code:
> #pragma vp_entryPoint atmos_fragment_main
> varying vec3 atmos_vert;
> void atmos_fragment_main(inout vec4 color)
> {
>
>
>
>
> In this shader code the analyzed line would be "atmos_fragment_main
> varying vec3 atmos_vert;
> void atmos_fragment_main" which looks wrong to me.
>
> I think the open bracket should only be use when it's found before the end
> of the current line. Right?
>
> Regards,
> Andreas
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66430#66430
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160225/8e2517f9/attachment-0003.htm>


More information about the osg-users mailing list