More GFX plugin cleanup, still no visible changes.

New right-click popup menu in game list - allow editing patch files easily.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@31 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-07-20 12:26:32 +00:00
parent c7795c41b7
commit 461077b1a1
52 changed files with 509 additions and 805 deletions

View File

@ -50,29 +50,6 @@ namespace D3D
return vShader;
}
LPDIRECT3DVERTEXSHADER9 LoadVShader(const char *filename)
{
//alloc a temp buffer for code
char *temp = new char[65536];
//open and read the file
FILE *f = fopen(filename,"rb");
if (!f)
{
MessageBox(0,"FATAL ERROR Vertex Shader file not found",filename,0);
return 0;
}
fseek(f,0,SEEK_END);
int len = ftell(f);
fseek(f,0,SEEK_SET);
fread(temp,len,1,f);
fclose(f);
LPDIRECT3DVERTEXSHADER9 vShader = CompileVShader(temp,len);
//kill off our temp code buffer
delete [] temp;
//return the compiled shader, or null
return vShader;
}
LPDIRECT3DPIXELSHADER9 CompilePShader(const char *code, int len)
{
@ -111,26 +88,4 @@ namespace D3D
return pShader;
}
LPDIRECT3DPIXELSHADER9 LoadPShader(const char *filename)
{
//open and read the file
FILE *f = fopen(filename,"rb");
if (!f)
{
MessageBox(0,"FATAL ERROR Pixel Shader file not found",filename,0);
return 0;
}
fseek(f,0,SEEK_END);
int len = ftell(f);
char *temp = new char[len];
fseek(f,0,SEEK_SET);
fread(temp,len,1,f);
fclose(f);
LPDIRECT3DPIXELSHADER9 pShader = CompilePShader(temp,len);
//kill off our temp code buffer
delete [] temp;
//return the compiled shader, or null
return pShader;
}
}