> On Jul 5, 2019, at 1:34 PM, Sven Barth via fpc-devel 
> <fpc-devel@lists.freepascal.org> wrote:
> 
> Why should they always be required? If your multiline string is shorter than 
> 256 characters then all is well.
> 
> And otherwise you'd have the same problem with an ordinary string constant.
> 
> So this behaves exactly as expected and desired. 
> 

Sure, but I suspect majority of strings will be longer than 255. I guess this 
isn’t just multi-line string related but how do I declare a string constant 
that doesn’t then change “string” in the entire unit? I tried the typed 
constant but that doesn’t seem to work (got Illegal expression).

const lines: AnsiString = `
  #version 150

  uniform sampler2D textures[8];
  in vec2 vertexTexCoord;
  in vec4 vertexColor;
  in float vertexUVMap;
  out vec4 fragColor;

  void main()
  {
    if (vertexUVMap == 255) {
      fragColor = vertexColor;
    } else {
      fragColor = texture(textures[int(vertexUVMap)], vertexTexCoord.st);
      if (vertexColor.a < fragColor.a) {
        fragColor.a = vertexColor.a;
      }
    }
  }`;


Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to