Put some stuff in the gfx plugins into namespaces, so that the symbols won't collide if someone decides to merge the gfx plugins into dolphin too. still more things left to do though.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6972 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2011-01-29 20:16:51 +00:00
parent fb35a83d2c
commit 7f97ce79bb
55 changed files with 531 additions and 329 deletions

View File

@ -32,6 +32,9 @@
#include "FileUtil.h"
#include "Debugger.h"
namespace OGL
{
static int s_nMaxPixelInstructions;
static GLuint s_ColorMatrixProgram = 0;
static GLuint s_DepthMatrixProgram = 0;
@ -53,23 +56,6 @@ GLuint PixelShaderCache::GetColorMatrixProgram()
return s_ColorMatrixProgram;
}
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
float f[4] = { f1, f2, f3, f4 };
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, const_number, f);
}
void SetPSConstant4fv(unsigned int const_number, const float *f)
{
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, const_number, f);
}
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
for (unsigned int i = 0; i < count; i++,f+=4)
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, const_number + i, f);
}
void PixelShaderCache::Init()
{
glEnable(GL_FRAGMENT_PROGRAM_ARB);
@ -354,3 +340,23 @@ void PixelShaderCache::SetCurrentShader(GLuint Shader)
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
}
}
} // namespace OGL
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
float f[4] = { f1, f2, f3, f4 };
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, const_number, f);
}
void SetPSConstant4fv(unsigned int const_number, const float *f)
{
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, const_number, f);
}
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
for (unsigned int i = 0; i < count; i++,f+=4)
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, const_number + i, f);
}