Hello Guest

NanoVG arc becomes rectangle when drawing to renderbuffer

  • 2 Replies
  • 208 Views
NanoVG arc becomes rectangle when drawing to renderbuffer
« on: August 21, 2019, 13:53:18 »
Hi,

I changed the drawing code of my application recently so that everything is drawn to a Framebuffer Object with a Renderbuffer Object attached. The arcs it draws with NanoVG became rectangles. Perhaps there is something about setting up the Renderbuffer Object that needs to be done for it to work properly? It also flickers weirdly when hovering over the band, but that might be outside to scope of this topic. The arrow makes the window slightly larger. The window is drawn in two chunks that get combined using blitting after changing the window size. There was a problem with the Framebuffer Object cropping its contents to the window dimensions otherwise.


*

Offline spasi

  • *****
  • 2169
    • WebHotelier
Re: NanoVG arc becomes rectangle when drawing to renderbuffer
« Reply #1 on: August 21, 2019, 14:40:51 »
Does the framebuffer object have a GL_STENCIL_ATTACHMENT? A stencil buffer is required for correct NanoVG rendering.

Re: NanoVG arc becomes rectangle when drawing to renderbuffer
« Reply #2 on: August 21, 2019, 18:01:02 »
Thank you, it is working again.