<div dir="ltr"><div dir="ltr">On Fri, Jul 5, 2019 at 4:36 PM Ryan Joseph <<a href="mailto:genericptr@gmail.com">genericptr@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The problem is I was using ObjFPC mode. Works fine in Delphi. A bug?<br>
<br>
{$mode objfpc}<br>
{$modeswitch multilinestrings}<br>
{$multilinestringlineending crlf}<br>
<br>
program test;<br>
<br>
{$push}<br>
{$H+}<br>
const lines = `<br>
#version 150<br>
<br>
uniform sampler2D textures[8];<br>
in vec2 vertexTexCoord;<br>
in vec4 vertexColor;<br>
in float vertexUVMap;<br>
out vec4 fragColor;<br>
<br>
void main()<br>
{<br>
if (vertexUVMap == 255) {<br>
fragColor = vertexColor;<br>
} else {<br>
fragColor = texture(textures[int(vertexUVMap)], vertexTexCoord.st);<br>
if (vertexColor.a < fragColor.a) {<br>
fragColor.a = vertexColor.a;<br>
}<br>
}<br>
}`;<br>
{$pop}<br>
<br>
begin<br>
writeln(lines);<br>
end.<br></blockquote><div><br></div><div>I'll have to look at this later today when I have more free time. I did however test a variety of things (both typed and untyped constants and variables, and also literals in function calls, and had no issues.)</div><div><br></div><div>Note again that {$modeswitch multilinestrings} does not exist yet, though. Try putting your directives after "program", not before, also.</div></div></div>