mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-02 13:35:33 +00:00
I still sense a disturbance in the code, but we are making progress
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1113 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
@ -273,6 +273,7 @@ void Renderer::RenderFrame(PresetOutputs *presetOutputs, PresetInputs *presetInp
|
||||
SetupPass1(presetOutputs, *presetInputs);
|
||||
|
||||
#ifdef USE_CG
|
||||
shaderEngine.SetupCgQVariables(presetOutputs->warpShader, *presetOutputs);
|
||||
shaderEngine.enableShader(presetOutputs->warpShader, presetOutputs, presetInputs);
|
||||
#endif
|
||||
|
||||
@ -579,10 +580,12 @@ void Renderer::PerPixelMath(PresetOutputs * presetOutputs, PresetInputs * preset
|
||||
|
||||
void Renderer::reset(int w, int h)
|
||||
{
|
||||
this->aspect = (float) h / (float) w;
|
||||
aspect = (float) h / (float) w;
|
||||
this -> vw = w;
|
||||
this -> vh = h;
|
||||
|
||||
shaderEngine.setAspect(aspect);
|
||||
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
glCullFace(GL_BACK);
|
||||
|
||||
@ -228,7 +228,7 @@ bool ShaderEngine::LoadCgProgram(Shader &shader)
|
||||
while (found != std::string::npos)
|
||||
{
|
||||
found += 8;
|
||||
size_t end = program.find_first_of(" ;,\n\r)", found);
|
||||
size_t end = program.find_first_of(" ;.,\n\r)", found);
|
||||
|
||||
if (end != std::string::npos)
|
||||
{
|
||||
@ -531,6 +531,10 @@ void ShaderEngine::SetupCgQVariables(Shader &shader, const PresetOutputs &q)
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderEngine::setAspect(float aspect)
|
||||
{
|
||||
this->aspect = aspect;
|
||||
}
|
||||
void ShaderEngine::RenderBlurTextures(const Pipeline *pipeline, const PipelineContext &pipelineContext,
|
||||
const int texsize)
|
||||
{
|
||||
|
||||
@ -104,7 +104,9 @@ public:
|
||||
void enableShader(Shader &shader, const Pipeline *pipeline, const PipelineContext *pipelineContext);
|
||||
void disableShader();
|
||||
void reset();
|
||||
void setAspect(float aspect);
|
||||
std::string profileName;
|
||||
};
|
||||
|
||||
#endif /* SHADERENGINE_HPP_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user