mirror of
https://github.com/aap/librw.git
synced 2025-01-23 17:22:23 +00:00
55 lines
960 B
C++
55 lines
960 B
C++
#include <cstdio>
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
#include <cassert>
|
|
|
|
#include "../rwbase.h"
|
|
#include "../rwerror.h"
|
|
#include "../rwplg.h"
|
|
#include "../rwpipeline.h"
|
|
#include "../rwobjects.h"
|
|
#include "../rwanim.h"
|
|
#include "../rwengine.h"
|
|
#include "../rwplugins.h"
|
|
#include "rwd3d.h"
|
|
#include "rwd3d9.h"
|
|
|
|
namespace rw {
|
|
namespace d3d9 {
|
|
using namespace d3d;
|
|
|
|
static void*
|
|
matfxOpen(void *o, int32, int32)
|
|
{
|
|
matFXGlobals.pipelines[PLATFORM_D3D9] = makeMatFXPipeline();
|
|
return o;
|
|
}
|
|
|
|
static void*
|
|
matfxClose(void *o, int32, int32)
|
|
{
|
|
return o;
|
|
}
|
|
|
|
void
|
|
initMatFX(void)
|
|
{
|
|
Driver::registerPlugin(PLATFORM_D3D9, 0, ID_MATFX,
|
|
matfxOpen, matfxClose);
|
|
}
|
|
|
|
ObjPipeline*
|
|
makeMatFXPipeline(void)
|
|
{
|
|
ObjPipeline *pipe = new ObjPipeline(PLATFORM_D3D9);
|
|
pipe->instanceCB = defaultInstanceCB;
|
|
pipe->uninstanceCB = defaultUninstanceCB;
|
|
pipe->renderCB = defaultRenderCB;
|
|
pipe->pluginID = ID_MATFX;
|
|
pipe->pluginData = 0;
|
|
return pipe;
|
|
}
|
|
|
|
}
|
|
}
|