Search:

Type: Posts; User: pion

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Re: Problems with the J3DIMath.js library used in demos

    I ran across similar problem.

    I am switching to mjs. Please see
    http://blog.vlad1.com/2010/02/05/mjs-simple-vector-and-matrix-math-for-js/...
  2. Replies
    1
    Views
    2,255

    Re: Freeing loaded texture

    http://stackoverflow.com/questions/4776 ... e-on-webgl answers my question.

    ctx.deleteTexture(spiritTexture);
  3. Firefox Minefield Error/warning message: not well-formed

    In general, I notice that Firefox Minefield is much stricter than Chrome Canary when compiling my Javascript. Chrome Canary missed them. For example, it notifies me undeclared variables, assigning to...
  4. Replies
    1
    Views
    2,264

    Re: Accessing image data

    I use HTML5 <canvas> to read the texels with the following code snippets:


    var myCanvas = document.createElement("canvas");
    myCanvas.width = texture.image.width;
    myCanvas.height =...
  5. Replies
    1
    Views
    2,264

    Accessing image data

    I have the following code snippet:


    var texture = gl.createTexture();
    texture.image = new Image();
    texture.image.onload = function() {
    .... // I want to read the pixels once the image...
  6. Re: Maximum number of points allowed on drawArrays(POINTS)

    Unfortunately, 65,536 doesn't work for me. But 60,000 works for me.

    I am using the Chrome Canary build.

    Thanks.
  7. Re: Maximum number of points allowed on drawArrays(POINTS)

    I have found a temporary work around this problem.

    I have to draw 300,000 points. I just loop it with the following code snippets


    var count = 60000;
    for (var from=0; from<300000;...
  8. Maximum number of points allowed on drawArrays(POINTS)

    I have the following code snippet

    gl.drawArrays(gl.POINTS, 0, count);
    It displays correctly as expected when count is less than 60,000.
    However, it displays nothing when the count = 70,000.
    ...
  9. Replies
    3
    Views
    2,524

    Re: Link error: "Could not pack varying"

    I received the same error message again.

    It seems that there is a limit as how many varying variables you could use. See the discussions on...
  10. Thread: Missing texture3D

    by pion
    Replies
    2
    Views
    3,666

    Missing texture3D

    The OpenGL Shading Language version 1.28 http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf has the following:


    // Use the texture coordinate coord to do a texture lookup in the 3D...
  11. Replies
    3
    Views
    2,524

    Re: Link error: "Could not pack varying"

    I found the problem.

    My vertex shader has the following code snippets:


    varying vec3 v_halfVector;
    ...
    vec3 v_halfVector; // This is the problem due to the re-declaration of...
  12. Replies
    3
    Views
    2,524

    Link error: "Could not pack varying"

    My vertex and fragment shaders compile correctly on WebGL running Chrome Canary build. But I got the following shader link error:

    Could not pack varying _v_lifetime
    With the following code...
  13. OpenGL 2.0 Shading Language White Paper, Dave Baldwin

    I googled the OpenGL 2.0 Shading Language White Paper by Dave Baldwin. Unfortunately, I couldn't find it.

    Any help is appreciated. Thanks.
  14. Replies
    2
    Views
    2,256

    Manipulating gl_LightSource[gl_MaxLights]

    The The OpenGL ® Shading Language Spec version 1.20 http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf shows the following:


    struct gl_LightSourceParameters {
    vec4 ambient; ...
  15. Replies
    1
    Views
    2,255

    Freeing loaded texture

    I am looking at the Textured Box demo on http://www.khronos.org/webgl/wiki/Demo_Repository. It has the following code snippets:


    function loadImageTexture(ctx, url)
    {
    var texture =...
  16. Replies
    1
    Views
    2,226

    Missing TexEnv* functions

    I am looking at this tutorial http://www.clockworkcoders.com/oglsl/tutorial8.htm which has the following codes:


    glActiveTextureARB(GL_TEXTURE0_ARB);
    glBindTexture(GL_TEXTURE_2D, texture1);...
  17. Replies
    3
    Views
    3,294

    Re: Multitexture intro

    I found and fixed the problem


    gl.activeTexture(gl.TEXTURE0); // remove the "GL_" on GL_TEXTURE0
    gl.bindTexture(gl.TEXTURE_2D, photoTexture0);

    ...
  18. Replies
    3
    Views
    3,294

    Re: Multitexture intro

    I have just changed


    // Changed from 0 to 1
    gl.uniform1i(gl.getUniformLocation(gl.program, "texture1"), 1);

    Unfortunately, it still does not work as expected.
  19. Replies
    3
    Views
    3,294

    Multitexture intro

    I am learning to use multitexture on WebGL. I'd like to do the following:

    Pass 2 textures to the shader: texture0 and texture1
    Display texture0 if I access texture0
    Display texture1 if I access...
  20. Re: noise1 - no matching overloaded function found error mes

    It seems that WebGL uses GLSL version 1.0

    The OpenGL 2.0 GLSL version 1.0 http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf does not seem to provide noise1 function.
  21. noise1 - no matching overloaded function found error message

    I am reading the The OpenGL® Shading Language (Language Version: 1.2) http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf mentions, "8.9 Noise Functions - Noise functions are available to...
  22. Replies
    5
    Views
    2,383

    Re: Unexpected stretched texture

    Thanks Steve!
  23. Thread: Picking tutorial

    by pion
    Replies
    5
    Views
    7,373

    Re: Picking tutorial

    I finally got it working using the following as the guideline:

    Picking Tutorial - Color Coding http://www.lighthouse3d.com/opengl/picking/index.php?color1
    WebGL Lesson 16 – rendering to textures...
  24. Replies
    5
    Views
    2,383

    Re: Unexpected stretched texture

    I changed my texture coordinate to the following:


    var texCoords = new Float32Array(
    // [ 1, 1, 0, 1, 0, 0, 1, 0]
    [ 100, 100, -100, 100, -100, -100, ...
  25. Replies
    5
    Views
    2,383

    Re: Unexpected stretched texture

    Thanks for your reply Steve.

    Yes, it is a actually supposed to be a brick which should be applied repeatedly.

    My texture coordinate:

    // texCoord array
    var texCoords = new...
Results 1 to 25 of 37
Page 1 of 2 1 2