Isle
Loading...
Searching...
No Matches
mxdirect3d.h
Go to the documentation of this file.
1#ifndef MXDIRECT3D_H
2#define MXDIRECT3D_H
3
4#include "decomp.h"
5#include "mxdirectdraw.h"
6#include "mxdirectxinfo.h"
7#include "mxstl/stlcompat.h"
8
9#include <d3d.h>
10
11// VTABLE: LEGO1 0x100db800
12// VTABLE: BETA10 0x101c1af8
13// SIZE 0x894
14
24class MxDirect3D : public MxDirectDraw {
25public:
29 MxDirect3D();
30
34 ~MxDirect3D() override;
35
50 HWND hWnd,
51 BOOL fullscreen_1,
52 BOOL surface_fullscreen,
53 BOOL onlySystemMemory,
54 int width,
55 int height,
56 int bpp,
57 const PALETTEENTRY* pPaletteEntries,
58 int paletteEntryCount
59 ) override; // vtable+0x04
60
64 void Destroy() override; // vtable+0x08
65
69 void DestroyButNotDirectDraw() override; // vtable+0x0c
70
75 MxAssignedDevice* AssignedDevice() { return m_currentDeviceInfo; }
76
81 IDirect3D2* Direct3D() { return m_pDirect3d; }
82
87 IDirect3DDevice2* Direct3DDevice() { return m_pDirect3dDevice; }
88
96 BOOL SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_driver, Direct3DDeviceInfo* p_device);
97
98protected:
103 BOOL D3DCreate();
104
110
116 int ZBufferDepth(MxAssignedDevice* p_assignedDevice);
117
118 // SYNTHETIC: LEGO1 0x1009b120
119 // SYNTHETIC: BETA10 0x1011c0f0
120 // MxDirect3D::`scalar deleting destructor'
121
122private:
126 MxAssignedDevice* m_currentDeviceInfo; // 0x880
127
131 IDirect3D2* m_pDirect3d; // 0x884
132
136 IDirect3DDevice2* m_pDirect3dDevice; // 0x888
137
141 BOOL m_bTexturesDisabled; // 0x88c
142
146 undefined4 m_unk0x890; // 0x890
147};
148
149// GLOBAL: LEGO1 0x100dd1b0
150// GLOBAL: BETA10 0x101c2de8
151// IID_IDirect3D2
152
153#endif // MXDIRECT3D_H
[AI] Holds assignment and description details for a Direct3D rendering device in use.
Definition: mxdirectxinfo.h:65
[AI] Enumerates DirectDraw/Direct3D drivers, devices, and display modes on the system.
[AI] MxDirect3D provides Direct3D (D3D) rendering capabilities layered on top of MxDirectDraw,...
Definition: mxdirect3d.h:24
~MxDirect3D() override
[AI] Destroys the MxDirect3D object, releasing associated Direct3D interfaces and memory for assigned...
Definition: mxdirect3d.cpp:26
BOOL SetDevice(MxDeviceEnumerate &p_deviceEnumerate, MxDriver *p_driver, Direct3DDeviceInfo *p_device)
[AI] Selects which Direct3D device to be used for rendering, given an enumeration of available device...
Definition: mxdirect3d.cpp:253
IDirect3DDevice2 * Direct3DDevice()
[AI] Provides access to the currently selected Direct3D device interface.
Definition: mxdirect3d.h:87
BOOL D3DCreate()
[AI] Internal D3D initialization helper: acquires the IDirect3D2 interface from DirectDraw.
Definition: mxdirect3d.cpp:110
void DestroyButNotDirectDraw() override
[AI] Like Destroy(), but preserves the DirectDraw context; only Direct3D/3DDevice and D3D-specific ob...
Definition: mxdirect3d.cpp:101
MxAssignedDevice * AssignedDevice()
[AI] Returns the currently selected/active rendering device information for 3D output.
Definition: mxdirect3d.h:75
int ZBufferDepth(MxAssignedDevice *p_assignedDevice)
[AI] Determines the suitable ZBuffer depth for a selected rendering device, according to its capabili...
Definition: mxdirect3d.cpp:220
BOOL D3DSetMode()
[AI] Internal method to initialize D3D video mode, create devices, ZBuffer, and clear surfaces as nee...
Definition: mxdirect3d.cpp:124
MxDirect3D()
[AI] Constructs a new MxDirect3D object.
Definition: mxdirect3d.cpp:16
IDirect3D2 * Direct3D()
[AI] Provides access to the underlying IDirect3D2 interface for advanced 3D rendering operations.
Definition: mxdirect3d.h:81
BOOL Create(HWND hWnd, BOOL fullscreen_1, BOOL surface_fullscreen, BOOL onlySystemMemory, int width, int height, int bpp, const PALETTEENTRY *pPaletteEntries, int paletteEntryCount) override
[AI] Initializes DirectDraw and Direct3D, prepares primary surfaces and selects the video mode,...
Definition: mxdirect3d.cpp:33
void Destroy() override
[AI] Tears down the Direct3D environment, including releasing D3D and D3DDevice objects,...
Definition: mxdirect3d.cpp:82
Class responsible for interfacing with DirectDraw to manage rendering surfaces, palettes,...
Definition: mxdirectdraw.h:17
HWND hWnd
Definition: ddraw.h:425
unsigned int undefined4
Definition: decomp.h:28
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
[AI] STL compatibility layer header to provide consistent STL (Standard Template Library) types and a...
[AI] Encapsulates Direct3D device enumeration information and capability structures.
[AI] Holds data about a DirectDraw driver including devices and supported display modes.