-
-
Notifications
You must be signed in to change notification settings - Fork 392
[WIP] Renderer backend selection #877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…, `VideoEcho`, and `Waveform`) to use `OpenGLRenderItem` instead of `RenderItem`, and include the correct header file. This fixes the build errors by: 1. Changing the base class to `OpenGLRenderItem` which contains the required `m_vaoID` and `m_vboID` members 2. Updating the includes to point to the new header location 3. Removing redundant `RenderItem::` prefixes since we inherit directly from `OpenGLRenderItem` 4. Cleaning up some formatting inconsistencies The changes maintain all existing functionality while fixing the compilation errors related to missing OpenGL buffer IDs. The classes will now properly inherit the OpenGL-specific rendering functionality they require.
… header resolution
Just as a comment here: Please don't remove the Doxygen comments from the classes (e.g. this one). They may look hard to read in the code, but enable us to generate a proper code documentation from it once all classes are properly commented/documented. If a comment is outdated after editing/refactoring something, it should rather be updated to reflect the current state. Only documentation of:
can/may be removed. Most modern IDEs also provide a nice rendering of these Doxygen comments directly in the source tree. These IDEs (e.g. CLion) also show the parameter docs when hovering over a call or typing the function arguments, which is more information than just the declaration provides. |
This pull request refactors the
libprojectM
rendering pipeline to improve modularity and OpenGL backend integration. The changes primarily involve replacing the use of a genericRenderItem
base class with a more specificOpenGLRenderItem
class, updating initialization methods, and introducing a unique pointer for texture flipping. These updates aim to streamline the rendering process and enhance maintainability.Transition to OpenGL-specific Rendering:
Replaced the inheritance of
Renderer::RenderItem
withlibprojectM::Renderer::Backend::OpenGL::OpenGLRenderItem
in multiple classes, includingBorder
,CustomShape
,CustomWaveform
,DarkenCenter
,Filters
, andFinalComposite
. This change ensures the rendering logic is explicitly tied to the OpenGL backend. [1] [2] [3] [4] [5] [6]Updated initialization calls from
RenderItem::Init()
toInit()
in constructors across several classes to align with the new base class implementation. [1] [2] [3] [4] [5] [6]Texture Flipping Refactor:
Replaced the
Renderer::CopyTexture
instance with astd::unique_ptr<Renderer::CopyTexture>
to manage the texture flipping filter. This change improves memory management and ensures proper cleanup. [1] [2] [3]Updated calls to the
Draw
andTexture
methods ofm_flipTexture
to use the new unique pointer syntax (m_flipTexture->Draw
andm_flipTexture->Texture
). [1] [2] [3] [4]Header File Updates:
#include <Renderer/RenderItem.hpp>
with#include <Renderer/Backend/OpenGL/OpenGLRenderItem.hpp>
in header files to reflect the new OpenGL-specific base class. [1] [2] [3] [4] [5] [6]Code Cleanup:
CustomWaveform
andFinalComposite
to simplify the code and improve readability. [1] [2]