mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2025-12-01 12:11:20 +00:00
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:
@ -21,9 +21,8 @@ namespace MilkdropPreset {
|
||||
static constexpr uint32_t VerticesPerDrawCall = 1024 * 3;
|
||||
|
||||
PerPixelMesh::PerPixelMesh()
|
||||
: RenderItem()
|
||||
{
|
||||
RenderItem::Init();
|
||||
Init();
|
||||
}
|
||||
|
||||
void PerPixelMesh::InitVertexAttrib()
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user