> On Jul 5, 2019, at 12:10 PM, Ben Grasset <operato...@gmail.com> wrote:
> 
> Explicit "ShortString" variables are still exactly what they say they are in 
> all cases though, of course.
> 

This may present a bit of problem then because you don't appear to be able to 
opt-in to long strings just for constants. $h+ will always be required for 
multi-line strings but I don’t want the rest of my “string” types to turn into 
ansistrings. Is there any solution to this?

// ERROR: String constant too long while ansistrings are disabled
{$h+}
const lines = `
  #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;
      }
    }
  }`;
{$h-}


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