rodecomp/Source/Render/RenderAdapter.h
ragnarok-clanker a47d20f8be Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
2026-10-25 07:42:41 +00:00

44 lines
1.2 KiB
C++

#ifndef RAGNAROK_SOURCE_RENDER_RENDERADAPTER_H
#define RAGNAROK_SOURCE_RENDER_RENDERADAPTER_H
#include <string>
#include <vector>
#include <windows.h>
class DeviceOwnerDX9;
class DirectDrawEnumeration;
struct DeviceOptionsDX9;
struct RenderAdapter {
int backend;
UINT ordinal;
std::string description;
GUID drawGuid;
GUID renderGuid;
GUID deviceGuid;
std::string deviceName;
bool Matches(const RenderAdapter& selected) const;
};
struct AdapterConfiguration {
const int& backend;
const GUID& drawGuid;
const GUID& renderGuid;
const GUID& deviceGuid;
const char* deviceName;
};
RenderAdapter SelectedRenderAdapter(const AdapterConfiguration& configuration, bool serviceUsesDX7);
std::vector<RenderAdapter> EnumerateRenderAdapters(int backend, DirectDrawEnumeration& legacy);
std::vector<RenderAdapter> EnumerateAdaptersDX7(DirectDrawEnumeration& enumeration);
std::vector<RenderAdapter> EnumerateAdaptersDX9();
HRESULT InitializeConfiguredDeviceDX9(
DeviceOwnerDX9& owner, HWND window, const DeviceOptionsDX9& options, const AdapterConfiguration& configuration, bool serviceUsesDX7
);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(RenderAdapter) == 104);
#endif
#endif