Search:

Type: Posts; User: ian7916

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    2,238

    Re: problem about "gl.texImage2D" function

    How amazing

    var imgSrc = "XXX.gif";
    var texture = gl.createTexture();
    texture.image = new Image();
    texture.image.src = imgSrc;//<----- 1
    texture.onload = function(){...
  2. Replies
    3
    Views
    2,238

    Re: problem about "gl.texImage2D" function

    the message firefox says

    error: uncaught exception: [Exception... "Failure arg 5 [nsIDOMWebGLRenderingContext.texImage2D]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::...
  3. Replies
    3
    Views
    2,238

    problem about "gl.texImage2D" function

    about my program:

    var imgSrc = "XXX.gif";
    var texture = gl.createTexture();
    texture.image = new Image();
    texture.onload = function(){
    gl.bindTexture(gl.TEXTURE_2D,texture);
    ...
Results 1 to 3 of 4