mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-15 21:41:43 +00:00
Almost there.
This commit is contained in:
parent
164b56ff73
commit
33c24f0a15
6 changed files with 175 additions and 88 deletions
|
@ -125,7 +125,6 @@ VERTEXSHADER* VertexShaderCache::SetShader(u32 components)
|
|||
// Make an entry in the table
|
||||
VSCacheEntry& entry = vshaders[uid];
|
||||
last_entry = &entry;
|
||||
entry.shader.bGLSL = g_ActiveConfig.bUseGLSL;
|
||||
const char *code = GenerateVertexShaderCode(components, g_ActiveConfig.bUseGLSL ? API_GLSL : API_OPENGL);
|
||||
GetSafeVertexShaderId(&entry.safe_uid, components);
|
||||
|
||||
|
@ -223,6 +222,7 @@ bool CompileGLSLVertexShader(VERTEXSHADER& vs, const char* pstrprogram)
|
|||
|
||||
(void)GL_REPORT_ERROR();
|
||||
vs.glprogid = result;
|
||||
vs.bGLSL = true;
|
||||
return true;
|
||||
}
|
||||
void SetVSConstant4fvByName(const char * name, unsigned int offset, const float *f, const unsigned int count = 1)
|
||||
|
@ -352,6 +352,7 @@ bool CompileCGVertexShader(VERTEXSHADER& vs, const char* pstrprogram)
|
|||
plocal = strstr(plocal + 13, "program.local");
|
||||
}
|
||||
glGenProgramsARB(1, &vs.glprogid);
|
||||
vs.bGLSL = false;
|
||||
VertexShaderCache::SetCurrentShader(vs.glprogid);
|
||||
|
||||
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(pcompiledprog), pcompiledprog);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue