Closed ghost closed 1 year ago
That should not be too difficult, but I am not sure how to integrate it nicely. The problem is to compose the state of the internal renderer with any effect done in the canvas.
It could be as simple as a callback invoked at the right point with some information on the state of the openGL renderer. Alternatively, the canvas could be rendered to another target (an FBO) and blitted by wall.
Do you have any thought on that?
No I don't have any ideas, my first exposure with OpenGL is fairly new, I'm a DSP guy doing a bit of programming, without an addiction to Matlab :-)
Do I really need a full blown canvas? I need to draw GL_LINE_STRIP and GL_LINES at 60fps. But drawing those lines with more than 2 API calls is just too ugly.
Here's a screenshot of what I need.
Thanks, Frédéric!
This can be done directly in Wall, using Path API, a stroke and a gradient. It should be very efficient (translating to two draw calls and doing close to no (OCaml) allocation). It will be a lot work to do better (I can tune the implementation a bit if necessary, I paid attention to the hot path but I haven't stressed this particular case), especially if you care about anti-aliasing.
Oh great, you mean that I can use Path.line_to 500 times and GL API is only called at the stroke?
Indeed :)
Hello Frédéric,
I would like to use Wall for developing an audio scope & spectrum analyzer, for this I would need to get an OpenGL (well, gles2) canvas inside my Wall window. Is it possible that you implement such a thing in a not too far future?
NanoGUI do this, but it's C++ and I want to keep coding in OCaml :-)
Thank for this very neat project, BTW!