mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-12 02:59:00 +00:00
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:
parent
e004800e68
commit
3234bca193
13 changed files with 719 additions and 26 deletions
|
@ -25,6 +25,9 @@
|
|||
#include "PixelShaderGen.h"
|
||||
#include "VertexShaderGen.h"
|
||||
|
||||
#include <Cg/cg.h>
|
||||
#include <Cg/cgD3D9.h>
|
||||
|
||||
typedef u32 tevhash;
|
||||
|
||||
tevhash GetCurrentTEV();
|
||||
|
@ -33,7 +36,8 @@ class PixelShaderCache
|
|||
{
|
||||
struct PSCacheEntry
|
||||
{
|
||||
LPDIRECT3DPIXELSHADER9 shader;
|
||||
//LPDIRECT3DPIXELSHADER9 shader;
|
||||
CGprogram shader;
|
||||
|
||||
int frameCount;
|
||||
PSCacheEntry()
|
||||
|
@ -43,8 +47,12 @@ class PixelShaderCache
|
|||
}
|
||||
void Destroy()
|
||||
{
|
||||
if (shader)
|
||||
shader->Release();
|
||||
if (shader) {
|
||||
cgD3D9UnloadProgram(shader);
|
||||
cgDestroyProgram(shader);
|
||||
// shader->Release();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -57,6 +65,7 @@ public:
|
|||
static void Cleanup();
|
||||
static void Shutdown();
|
||||
static void SetShader();
|
||||
static CGprogram CompileCgShader(const char *pstrprogram);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue