Make Cg conditional on those platforms for which it is available.

Of course, this doesn't do much good without another shader compiler..

WIP of OS X application bundle building.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5961 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-24 10:24:16 +00:00
parent 7828a689e7
commit 53f5bc682d
9 changed files with 59 additions and 41 deletions

View File

@ -24,9 +24,6 @@
#include "GLUtil.h"
#include <Cg/cg.h>
#include <Cg/cgGL.h>
#include "Render.h"
#include "VertexShaderGen.h"
#include "VertexShaderManager.h"
@ -187,6 +184,7 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
ERROR_LOG(VIDEO, "glError %08x before VS!", err);
}
#if defined HAVE_CG && HAVE_CG
char stropt[64];
sprintf(stropt, "MaxLocalParams=256,MaxInstructions=%d", s_nMaxVertexInstructions);
const char *opts[] = {"-profileopts", stropt, "-O2", "-q", NULL};
@ -228,6 +226,7 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
}
cgDestroyProgram(tempprog);
#endif
#if defined(_DEBUG) || defined(DEBUGFAST)
vs.strprog = pstrprogram;