The changes update the inheritance of several classes (PerPixelMesh, 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.
This commit is contained in:
Mischa Spiegelmock (aider)
2025-04-17 09:34:53 -07:00
parent ee3873af76
commit 050966a221
6 changed files with 13 additions and 16 deletions

View File

@ -21,9 +21,8 @@ namespace MilkdropPreset {
static constexpr uint32_t VerticesPerDrawCall = 1024 * 3;
PerPixelMesh::PerPixelMesh()
: RenderItem()
{
RenderItem::Init();
Init();
}
void PerPixelMesh::InitVertexAttrib()

View File

@ -1,6 +1,6 @@
#pragma once
#include <Renderer/RenderItem.hpp>
#include <Renderer/Backend/OpenGL/OpenGLRenderItem.hpp>
#include <Renderer/Shader.hpp>
#include <cstdint>
@ -27,7 +27,7 @@ class MilkdropShader;
*
* The mesh size can be changed between frames, the class will reallocate the buffers if needed.
*/
class PerPixelMesh : public Renderer::RenderItem
class PerPixelMesh : public libprojectM::Renderer::Backend::OpenGL::OpenGLRenderItem
{
public:
PerPixelMesh();

View File

@ -4,10 +4,9 @@ namespace libprojectM {
namespace MilkdropPreset {
VideoEcho::VideoEcho(const PresetState& presetState)
: RenderItem()
, m_presetState(presetState)
: m_presetState(presetState)
{
RenderItem::Init();
Init();
}
void VideoEcho::InitVertexAttrib()

View File

@ -5,7 +5,7 @@
#include <projectM-opengl.h>
#include <Renderer/RenderItem.hpp>
#include <Renderer/Backend/OpenGL/OpenGLRenderItem.hpp>
namespace libprojectM {
namespace MilkdropPreset {
@ -13,15 +13,15 @@ namespace MilkdropPreset {
/**
* @brief Renders a video "echo" (ghost image) effect and gamma adjustments.
*/
class VideoEcho: public Renderer::RenderItem
class VideoEcho : public libprojectM::Renderer::Backend::OpenGL::OpenGLRenderItem
{
public:
VideoEcho() = delete;
VideoEcho() = delete;
explicit VideoEcho(const PresetState& presetState);
void InitVertexAttrib() override;
void Draw();
void Draw();
private:
void DrawVideoEcho();

View File

@ -18,10 +18,9 @@ namespace libprojectM {
namespace MilkdropPreset {
Waveform::Waveform(PresetState& presetState)
: RenderItem()
, m_presetState(presetState)
: m_presetState(presetState)
{
RenderItem::Init();
Init();
}
void Waveform::InitVertexAttrib()

View File

@ -5,7 +5,7 @@
#include "Waveforms/WaveformMath.hpp"
#include <Renderer/RenderItem.hpp>
#include <Renderer/Backend/OpenGL/OpenGLRenderItem.hpp>
#include <memory>
#include <vector>
@ -16,7 +16,7 @@ namespace MilkdropPreset {
class PresetState;
class PerFrameContext;
class Waveform : public Renderer::RenderItem
class Waveform : public libprojectM::Renderer::Backend::OpenGL::OpenGLRenderItem
{
public:
explicit Waveform(PresetState& presetState);