isle-portable/miniwin/miniwin/include/miniwin_d3d.h
2025-05-14 01:39:12 +02:00

46 lines
1.1 KiB
C

#pragma once
#include "miniwin_ddraw.h"
// --- Defines and Macros ---
#define D3DPAL_RESERVED 0x00000000
#define D3DPAL_READONLY 0x00000001
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001
// --- Enums ---
enum D3DCOLORMODEL {
D3DCOLOR_NONE,
D3DCOLOR_RGB,
D3DCOLOR_MONO
};
// --- GUIDs ---
DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1, 0x662a, 0x11cf, 0x9a, 0x39, 0x00, 0xaa, 0x00, 0x6e, 0xf5, 0x5a);
// --- Structs ---
struct D3DVECTOR {
float x, y, z;
};
struct D3DDEVICEDESC {
DWORD dwFlags;
DWORD dwDeviceZBufferBitDepth;
D3DCOLORMODEL dcmColorModel;
DWORD dwDeviceRenderBitDepth;
struct {
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
} dpcTriCaps;
};
typedef D3DDEVICEDESC* LPD3DDEVICEDESC;
struct IDirect3DDevice2 : virtual public IUnknown {};
typedef HRESULT (*LPD3DENUMDEVICESCALLBACK)(LPGUID, LPSTR, LPSTR, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
struct IDirect3D2 : virtual public IUnknown {
virtual HRESULT CreateDevice(const GUID& guid, void* pBackBuffer, IDirect3DDevice2** ppDirect3DDevice) = 0;
virtual HRESULT EnumDevices(LPD3DENUMDEVICESCALLBACK cb, void* ctx) = 0;
};
typedef IDirect3D2* LPDIRECT3D2;