Direct3D + Cg progress, the plugin is still not working due to some missing features.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2494 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY
2009-03-01 01:09:32 +00:00
parent e004800e68
commit 3234bca193
13 changed files with 719 additions and 26 deletions

View File

@ -25,11 +25,15 @@
#include "D3DBase.h"
#include "VertexShaderGen.h"
#include <Cg/cg.h>
#include <Cg/cgD3D9.h>
class VertexShaderCache
{
struct VSCacheEntry
{
LPDIRECT3DVERTEXSHADER9 shader;
//LPDIRECT3DVERTEXSHADER9 shader;
CGprogram shader;
int frameCount;
VSCacheEntry()
{
@ -38,8 +42,11 @@ class VertexShaderCache
}
void Destroy()
{
if (shader)
shader->Release();
if (shader) {
cgD3D9UnloadProgram(shader);
cgDestroyProgram(shader);
// shader->Release();
}
}
};
@ -52,6 +59,7 @@ public:
static void Cleanup();
static void Shutdown();
static void SetShader(u32 components);
static CGprogram CompileCgShader(const char *pstrprogram);
};
#endif // _VERTEXSHADERCACHE_H