Multiline Strings
Florian Bösch
pyalot at gmail.com
Sat Mar 8 03:41:20 PST 2014
On Fri, Mar 7, 2014 at 8:52 PM, Peter van der Zee <ecma at qfox.nl> wrote:
> I think you want to take a look at "source maps". They're specifically
> designed to deal with this problem.
>
The problem is that a function like compileShader would look like this:
var compileShader(source){
var shader = gl.createShader(gl.VERTEX_SHADER);
gl.shaderSource(shader, source);
gl.compileShader(shader);
if(!gl.getShaderParameter(GL_COMPILE_STATUS)){
var error = glGetShaderInfoLog(shader);
// now what?
// need file of source
// need lines # of source
}
}
And you'd do things like:
var source = """
void main(){
#{someSnippet}
gl_FragColor = whatever;
}
"""
compileShader(source);
I don't see how source maps help either.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140308/33e944f3/attachment.html>
More information about the es-discuss
mailing list