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:
psperl
2008-07-20 03:48:06 +00:00
parent f18f1c19f7
commit f34c05943e
3 changed files with 11 additions and 2 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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_ */