Skip to content

Yet another OpenGL renderer #44

Description

@nikp123

This is partly motivated by seeing how much I like the cairo system that I built. Unfortunately it's cairo, which means that the rendering is quite slow for something as intense as a visualizer. The current system, while more flexible than the last ones, is nothing in comparison to what cairo achieves.

My idea is the following:

xava main -> platform native window -> OpenGL main handle (via GLEW or EGL) -> OpenGL modules (emphasis on the s)

Implemented like this:

  1. The main handle should be able to load multiple modules using arrays of structs and a global "OpenGL module handle" that exists in cairo as well. This will allow the modules to use the same resources as all other parts of the visualizer.
  2. The main handle SHOULD handle the post processing shaders, because applying multiple post shaders basically makes no goddamn sense, you'll just get a corrupted/ugly looking image.
  3. The main handle should initialize the mian OpenGL resources/variables and let the modules create their own uniforms and such.
  4. The modules should draw to the same buffer using the FBO system already built, this way we ensure that the visualizer doesn't take hundreds of MB of VRAM, because creating a FB for EVERY single module is a memory hog and GPU hog. However this means that the modules themselves should be responsible for what they draw on the screen, aka. no module should overwrite the entire screen.
  5. The post shaders should have standardized uniforms and optional ones enabled through the config.ini thing I've already built. This ensures that the resources NOT used by the visualizer don't end up calculated, saving on (already limited) resources.
  6. Post shaders should demonstrate the power of filtering and what it can do to an OpenGL scene.
  7. The individual modules should focus on keeping the logic to themselves and handle geometry in the shader itself (if possible), mostly because geometry shaders are not well supported except on newer graphics cards 2014+ (i know this may seem old, but people are still running bad PCs).
  8. The modules should also share resources if possible: intensity value and other goodies. Perhaps a common feature flag (similar to how regions are handled by cairo)?
  9. The main handle (AND ONLY THE MAIN HANDLE) should take care of clearing the FBO. The same as cairo.
  10. Implement previous features that are now missing such as oscilloscope, artwork, kinetic... etc. through this system, if it ends up working.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions