Search notes:

WebGL: accessing source code from javascript

First, the source code is defined within a <script> tag whose type is explicitly not set to text/javascript:
<script id="fragment-shader-src" type="x-shader/x-fragment">
    varying lowp vec4 vColor;
    
    void main(void) {
      gl_FragColor = vColor;
    }
</script>
Then the source code is loaded with
var src_text = document.getElementById('fragment-shader-src').text;
Alternatively, the source code can also be stored in so called multi line strings.

See also

Graphic Library Shader Language

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759415196, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/web/WebGL/GLSL/source-code(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78