2016-06-27 21:59:35 +02:00
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
#include "../rwbase.h"
|
|
|
|
#include "../rwerror.h"
|
|
|
|
#include "../rwplg.h"
|
|
|
|
#include "../rwpipeline.h"
|
|
|
|
#include "../rwobjects.h"
|
2016-07-11 20:27:21 +02:00
|
|
|
#include "../rwanim.h"
|
2016-06-27 21:59:35 +02:00
|
|
|
#include "../rwengine.h"
|
|
|
|
#include "../rwplugins.h"
|
|
|
|
#include "rwd3d.h"
|
|
|
|
#include "rwd3d9.h"
|
|
|
|
|
|
|
|
namespace rw {
|
|
|
|
namespace d3d9 {
|
|
|
|
using namespace d3d;
|
|
|
|
|
|
|
|
static void*
|
|
|
|
skinOpen(void *o, int32, int32)
|
|
|
|
{
|
|
|
|
skinGlobals.pipelines[PLATFORM_D3D9] = makeSkinPipeline();
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void*
|
|
|
|
skinClose(void *o, int32, int32)
|
|
|
|
{
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
initSkin(void)
|
|
|
|
{
|
|
|
|
Driver::registerPlugin(PLATFORM_D3D9, 0, ID_SKIN,
|
|
|
|
skinOpen, skinClose);
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjPipeline*
|
|
|
|
makeSkinPipeline(void)
|
|
|
|
{
|
|
|
|
ObjPipeline *pipe = new ObjPipeline(PLATFORM_D3D9);
|
|
|
|
pipe->instanceCB = defaultInstanceCB;
|
|
|
|
pipe->uninstanceCB = defaultUninstanceCB;
|
|
|
|
pipe->renderCB = defaultRenderCB;
|
|
|
|
pipe->pluginID = ID_SKIN;
|
|
|
|
pipe->pluginData = 1;
|
|
|
|
return pipe;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|