Loading ...
Sorry, an error occurred while loading the content.

Re: [PanoToolsNG] Re: PTViewerNG - High resolution example

Expand Messages
  • Ken Warner
    Fiero sent me this OpenGL snippet if (CheckExtension( GL_SGIS_texture_edge_clamp ) || CheckExtension( GL_ARB_texture_border_clamp )) {
    Message 1 of 32 , Feb 1, 2010
    • 0 Attachment
      Fiero sent me this OpenGL snippet

      if (CheckExtension("GL_SGIS_texture_edge_clamp") ||
      CheckExtension("GL_ARB_texture_border_clamp"))
      {
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
      }

      And when I was fiddling with Canvas3D I found that OpenGL ES spells
      parameters different than OpenGL. So I used:

      ---------
      Hey Fiero -- that worked nicely. No seams!!!

      Just a little trial and error to find the right spelling. For the
      JavaScript
      interface it's spelled like:

      glCanvas3D.texParameter(glCanvas3D.TEXTURE_2D,
      glCanvas3D.TEXTURE_WRAP_S, glCanvas3D.CLAMP_TO_EDGE);
      glCanvas3D.texParameter(glCanvas3D.TEXTURE_2D,
      glCanvas3D.TEXTURE_WRAP_T, glCanvas3D.CLAMP_TO_EDGE);
      ----------

      Something like this should help your cube viewer...

      ahoeben41 wrote:
      > The seams are more apparent (at least with me) when you zoom out all the way.
      >
      >> Rounding errors at the cube edge, a problem with cubic viewers since
      >> they exist. There is no good solution other than that the underlying
      >> opengl implementation is accurate which is not always the case.
      >
      > The way I ultimately solved it in SPi-V is by not clearing the "canvas" each frame (obviously SPi-V does not use a canvas). This way, the tiny holes left by the seams are filled with pixels from the last frame rendered. Is that an option with WebGL? (ie: not clearing the canvas, so you leave "trails" if you don't draw over the whole canvas).
      >
      >
    • hd_de_2000
      ... Just a leftover of my debugging session until I found out that it didn t work because of the offsetX-thing. I guess I will reinsert the return false
      Message 32 of 32 , Feb 1, 2010
      • 0 Attachment
        --- In PanoToolsNG@yahoogroups.com, "ahoeben41" <aldo@...> wrote:
        >
        > I see you removed the "return false" statements from the handleMouse[Down|Up|Move] handlers. I put those there to prevent accidental selections of html elements outside the canvas element. Come to think of it, you only need it for the handleMouseMove handler, and only if currentlyDragging is set.
        >
        > Or does that break things in Firefox? (Ah, brings back memories of the "good old days" of cross-browser testing...)
        >

        Just a leftover of my debugging session until I found out that it didn't work because of the offsetX-thing. I guess I will reinsert the "return false" statements.

        Regards

        Helmut Dersch
      Your message has been successfully submitted and would be delivered to recipients shortly.