1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00
DDrawCompat/DDrawCompat/Direct3dDeviceVtblVisitor.h

186 lines
4.5 KiB
C++

#pragma once
#define CINTERFACE
#include <d3d.h>
#include "DDrawVtableVisitor.h"
template <>
struct DDrawVtableForEach<IDirect3DDeviceVtbl>
{
template <typename Vtable, typename Visitor>
static void forEach(Visitor& visitor)
{
DDrawVtableForEach<IUnknownVtbl>::forEach<Vtable>(visitor);
DD_VISIT(Initialize);
DD_VISIT(GetCaps);
DD_VISIT(SwapTextureHandles);
DD_VISIT(CreateExecuteBuffer);
DD_VISIT(GetStats);
DD_VISIT(Execute);
DD_VISIT(AddViewport);
DD_VISIT(DeleteViewport);
DD_VISIT(NextViewport);
DD_VISIT(Pick);
DD_VISIT(GetPickRecords);
DD_VISIT(EnumTextureFormats);
DD_VISIT(CreateMatrix);
DD_VISIT(SetMatrix);
DD_VISIT(GetMatrix);
DD_VISIT(DeleteMatrix);
DD_VISIT(BeginScene);
DD_VISIT(EndScene);
DD_VISIT(GetDirect3D);
}
};
template <>
struct DDrawVtableForEach<IDirect3DDevice2Vtbl>
{
template <typename Vtable, typename Visitor>
static void forEach(Visitor& visitor)
{
DDrawVtableForEach<IUnknownVtbl>::forEach<Vtable>(visitor);
DD_VISIT(GetCaps);
DD_VISIT(SwapTextureHandles);
DD_VISIT(GetStats);
DD_VISIT(AddViewport);
DD_VISIT(DeleteViewport);
DD_VISIT(NextViewport);
DD_VISIT(EnumTextureFormats);
DD_VISIT(BeginScene);
DD_VISIT(EndScene);
DD_VISIT(GetDirect3D);
DD_VISIT(SetCurrentViewport);
DD_VISIT(GetCurrentViewport);
DD_VISIT(SetRenderTarget);
DD_VISIT(GetRenderTarget);
DD_VISIT(Begin);
DD_VISIT(BeginIndexed);
DD_VISIT(Vertex);
DD_VISIT(Index);
DD_VISIT(End);
DD_VISIT(GetRenderState);
DD_VISIT(SetRenderState);
DD_VISIT(GetLightState);
DD_VISIT(SetLightState);
DD_VISIT(SetTransform);
DD_VISIT(GetTransform);
DD_VISIT(MultiplyTransform);
DD_VISIT(DrawPrimitive);
DD_VISIT(DrawIndexedPrimitive);
DD_VISIT(SetClipStatus);
DD_VISIT(GetClipStatus);
}
};
template <>
struct DDrawVtableForEach<IDirect3DDevice3Vtbl>
{
template <typename Vtable, typename Visitor>
static void forEach(Visitor& visitor)
{
DDrawVtableForEach<IUnknownVtbl>::forEach<Vtable>(visitor);
DD_VISIT(GetCaps);
DD_VISIT(GetStats);
DD_VISIT(AddViewport);
DD_VISIT(DeleteViewport);
DD_VISIT(NextViewport);
DD_VISIT(EnumTextureFormats);
DD_VISIT(BeginScene);
DD_VISIT(EndScene);
DD_VISIT(GetDirect3D);
DD_VISIT(SetCurrentViewport);
DD_VISIT(GetCurrentViewport);
DD_VISIT(SetRenderTarget);
DD_VISIT(GetRenderTarget);
DD_VISIT(Begin);
DD_VISIT(BeginIndexed);
DD_VISIT(Vertex);
DD_VISIT(Index);
DD_VISIT(End);
DD_VISIT(GetRenderState);
DD_VISIT(SetRenderState);
DD_VISIT(GetLightState);
DD_VISIT(SetLightState);
DD_VISIT(SetTransform);
DD_VISIT(GetTransform);
DD_VISIT(MultiplyTransform);
DD_VISIT(DrawPrimitive);
DD_VISIT(DrawIndexedPrimitive);
DD_VISIT(SetClipStatus);
DD_VISIT(GetClipStatus);
DD_VISIT(DrawPrimitiveStrided);
DD_VISIT(DrawIndexedPrimitiveStrided);
DD_VISIT(DrawPrimitiveVB);
DD_VISIT(DrawIndexedPrimitiveVB);
DD_VISIT(ComputeSphereVisibility);
DD_VISIT(GetTexture);
DD_VISIT(SetTexture);
DD_VISIT(GetTextureStageState);
DD_VISIT(SetTextureStageState);
DD_VISIT(ValidateDevice);
}
};
template <>
struct DDrawVtableForEach<IDirect3DDevice7Vtbl>
{
template <typename Vtable, typename Visitor>
static void forEach(Visitor& visitor)
{
DDrawVtableForEach<IUnknownVtbl>::forEach<Vtable>(visitor);
DD_VISIT(GetCaps);
DD_VISIT(EnumTextureFormats);
DD_VISIT(BeginScene);
DD_VISIT(EndScene);
DD_VISIT(GetDirect3D);
DD_VISIT(SetRenderTarget);
DD_VISIT(GetRenderTarget);
DD_VISIT(Clear);
DD_VISIT(SetTransform);
DD_VISIT(GetTransform);
DD_VISIT(SetViewport);
DD_VISIT(MultiplyTransform);
DD_VISIT(GetViewport);
DD_VISIT(SetMaterial);
DD_VISIT(GetMaterial);
DD_VISIT(SetLight);
DD_VISIT(GetLight);
DD_VISIT(SetRenderState);
DD_VISIT(GetRenderState);
DD_VISIT(BeginStateBlock);
DD_VISIT(EndStateBlock);
DD_VISIT(PreLoad);
DD_VISIT(DrawPrimitive);
DD_VISIT(DrawIndexedPrimitive);
DD_VISIT(SetClipStatus);
DD_VISIT(GetClipStatus);
DD_VISIT(DrawPrimitiveStrided);
DD_VISIT(DrawIndexedPrimitiveStrided);
DD_VISIT(DrawPrimitiveVB);
DD_VISIT(DrawIndexedPrimitiveVB);
DD_VISIT(ComputeSphereVisibility);
DD_VISIT(GetTexture);
DD_VISIT(SetTexture);
DD_VISIT(GetTextureStageState);
DD_VISIT(SetTextureStageState);
DD_VISIT(ValidateDevice);
DD_VISIT(ApplyStateBlock);
DD_VISIT(CaptureStateBlock);
DD_VISIT(DeleteStateBlock);
DD_VISIT(CreateStateBlock);
DD_VISIT(Load);
DD_VISIT(LightEnable);
DD_VISIT(GetLightEnable);
DD_VISIT(SetClipPlane);
DD_VISIT(GetClipPlane);
DD_VISIT(GetInfo);
}
};