Render Framebuffer to Hotspottexture

  • Hello Klaus,

    I asked you before, about this topic. Now I've got the time to experiment a bit, but reached a wall, where I can't get further. When I switch to a different program in my framebuffer drawing function, there is a error thrown by webgl.

    Quote

    [.Offscreen-For-WebGL-0x7fd0ffc4e600]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to render with no buffer attached to enabled attribute 2

    It seems the vertexAttributes aren't enabled, after I restore the krpano state.

    To get to the root source of the error, I simplified the script to just render the triangle / square demo from learningwebgl.com to the framebuffer. Now there isn't any error, but the hotspot is only rendered black. Maybe you could give me a hint, how It could work.

    I use the glMatrix-0.9.5.min.js library to calculate the matrices. To call the function just use

    Code
    generateText(hotspot)

    Thank you very much for your help.

    Edited once, last by ninerian (September 21, 2016 at 1:50 PM).

  • So i got it now. *g*

    The texture was drawn on the front of the hotspot, but the hotspot.rx is set to 1 and I viewed the back. After setting gl.cullFace(gl.BACK) the texture was visible but upside down. So I now have to decide to rotate the hotspot or the texture.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!