• Content count

  • Joined

  • Last visited

Community Reputation

104 Neutral

About tglee

  • Rank

Personal Information

  1. OpenGL OpenGL for Linux and MacOSX?

    On CentOS/RHEL, you're probably after the [b]mesa-libGL-devel[/b] package.
  2. After nailing the move to the US, I've managed to forget to renew my personal domain. It's all gummed up with @godaddy ickiness. :( #failing
  3. hey @nrcantor -- secure APT for @newrelic was released to production yesterday. Let us know if you hit any more roadblocks.
  4. [quote name='Yours3!f' timestamp='1320874350' post='4882283']Hi, this will be exotic I'm trying to load an external text file from javascript, so that I can load it as a shader later. The file is loaded successfully, however when I try to access its contents I can't. I checked with firebug if it is loaded properly, and it was. When I try to access its content by using this: [code] function load_external_script(filename, type) { var script = document.createElement('script'); script.type = type; script.src = filename; script.setAttribute('id', filename); head.appendChild(script); } function getShader(gl, id) { var shaderScript = document.getElementById(id); if (!shaderScript) { return null; } var str = shaderScript.text; ... } load_external_script('vertex.vs', 'text/plain'); var fragmentShader = getShader(gl, "vertex.vs"); [/code] the str = ... line triggers an unexpected EOF error, and I checked: both text and innerHTML properties are empty despite the content is there... any ideas how can I get it? or is there another way of loading shaders from external source? I took the basic source from [url=""][/url] here's the uploaded file: [url=""]link[/url] Best regards, Yours3!f [/quote] Easy: use AJAX! XMLHttpRequest.responseText will give you direct access to the source of a shader. (Alternatively you can use the nicer JQuery or Prototype equivalents). Problem is you'll want to process the response asynchronously, which may complicate your initialization a little.