[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGLSL Media Type Proposal




It is generally agreed that using scripptags to transport shader source
is a bad practice, and this has nothing to do with the fact that you
can't src them.

Judging from most pieces of example code out there, including the ones suggested by the Khronos WebGL Wiki, using SCRIPT tags for shader programs seems like an *encouraged* practice. The examples even use the MIME types x-shader/x-fragment and x-shader/x-vertex in the SCRIPT tags. They're not official, but they're already common enough that newcomer me thought it was encouraged.


It's clumsy to pass GLSL source code as JavaScript string literals. How exactly are we expected to embed non-escaped shader source code in HTML documents?

If embedding is discouraged, then we're back to having external files. Are you suggesting that we use XMLHttpRequest? AJAX should be an optional technology, not a requirement. For external files, a MIME type would again be an advantage.

Have you got a better suggestion?

Thor

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------