1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00
Clementine-audio-player-Mac.../3rdparty/libprojectm/Renderer/Pipeline.cpp

50 lines
1.0 KiB
C++
Raw Normal View History

2010-06-06 23:43:45 +02:00
/*
* Pipeline.cpp
*
* Created on: Jun 17, 2008
* Author: pete
*/
#include "Pipeline.hpp"
#include "wipemalloc.h"
Pipeline::Pipeline() : staticPerPixel(false),gx(0),gy(0),blur1n(1), blur2n(1), blur3n(1),
blur1x(1), blur2x(1), blur3x(1),
blur1ed(1){}
void Pipeline::setStaticPerPixel(int gx, int gy)
{
staticPerPixel = true;
this->gx = gx;
this->gy = gy;
this->x_mesh= ( float ** ) wipemalloc ( gx * sizeof ( float * ) );
for ( int x = 0; x < gx; x++ )
{
this->x_mesh[x] = ( float * ) wipemalloc ( gy * sizeof ( float ) );
}
this->y_mesh= ( float ** ) wipemalloc ( gx * sizeof ( float * ) );
for ( int x = 0; x < gx; x++ )
{
this->y_mesh[x] = ( float * ) wipemalloc ( gy * sizeof ( float ) );
}
}
Pipeline::~Pipeline()
{
if (staticPerPixel)
{
for ( int x = 0; x < this->gx; x++ )
{
free(this->x_mesh[x]);
free(this->y_mesh[x]);
}
free(x_mesh);
free(y_mesh);
}
}
//void Pipeline::Render(const BeatDetect &music, const PipelineContext &context){}
Point Pipeline::PerPixel(Point p, const PerPixelContext context)
{return p;}