]> git.cworth.org Git - apitrace/blobdiff - specs/d3d8.py
Swizzle array objects of GL_APPLE_vertex_array_object
[apitrace] / specs / d3d8.py
index d3246019215c2988a7c7481fdc2cab70380aa1c3..e4994869d1d9e3a33cee5aeb94ce817df35cfe73 100644 (file)
@@ -29,8 +29,7 @@ from winapi import *
 from d3d8types import *
 from d3d8caps import *
 
-HRESULT = Enum("HRESULT", [
-    "D3D_OK",
+HRESULT = MAKE_HRESULT(ok = "D3D_OK", errors = [
     "D3DERR_WRONGTEXTUREFORMAT",
     "D3DERR_UNSUPPORTEDCOLOROPERATION",
     "D3DERR_UNSUPPORTEDCOLORARG",
@@ -54,6 +53,20 @@ HRESULT = Enum("HRESULT", [
     "D3DERR_DRIVERINVALIDCALL",
 ])
 
+D3DADAPTER = FakeEnum(UINT, [
+    "D3DADAPTER_DEFAULT",
+])
+
+D3DCREATE = Flags(DWORD, [
+   "D3DCREATE_FPU_PRESERVE",
+   "D3DCREATE_MULTITHREADED",
+   "D3DCREATE_PUREDEVICE",
+   "D3DCREATE_SOFTWARE_VERTEXPROCESSING",
+   "D3DCREATE_HARDWARE_VERTEXPROCESSING",
+   "D3DCREATE_MIXED_VERTEXPROCESSING",
+   "D3DCREATE_DISABLE_DRIVER_MANAGEMENT",
+])
+
 IDirect3D8 = Interface("IDirect3D8", IUnknown)
 IDirect3DDevice8 = Interface("IDirect3DDevice8", IUnknown)
 IDirect3DSwapChain8 = Interface("IDirect3DSwapChain8", IUnknown)
@@ -83,17 +96,17 @@ PDIRECT3DVOLUME8 = ObjPointer(IDirect3DVolume8)
 IDirect3D8.methods += [
     Method(HRESULT, "RegisterSoftwareDevice", [(OpaquePointer(Void), "pInitializeFunction")]),
     Method(UINT, "GetAdapterCount", []),
-    Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), Out(Pointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
-    Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter")]),
-    Method(HRESULT, "EnumAdapterModes", [(UINT, "Adapter"), (UINT, "Mode"), Out(Pointer(D3DDISPLAYMODE), "pMode")]),
-    Method(HRESULT, "GetAdapterDisplayMode", [(UINT, "Adapter"), Out(Pointer(D3DDISPLAYMODE), "pMode")]),
-    Method(HRESULT, "CheckDeviceType", [(UINT, "Adapter"), (D3DDEVTYPE, "CheckType"), (D3DFORMAT, "DisplayFormat"), (D3DFORMAT, "BackBufferFormat"), (BOOL, "Windowed")]),
-    Method(HRESULT, "CheckDeviceFormat", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (DWORD, "Usage"), (D3DRESOURCETYPE, "RType"), (D3DFORMAT, "CheckFormat")]),
-    Method(HRESULT, "CheckDeviceMultiSampleType", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SurfaceFormat"), (BOOL, "Windowed"), (D3DMULTISAMPLE_TYPE, "MultiSampleType")]),
-    Method(HRESULT, "CheckDepthStencilMatch", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "RenderTargetFormat"), (D3DFORMAT, "DepthStencilFormat")]),
-    Method(HRESULT, "GetDeviceCaps", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), Out(Pointer(D3DCAPS8), "pCaps")]),
-    Method(HMONITOR, "GetAdapterMonitor", [(UINT, "Adapter")]),
-    Method(HRESULT, "CreateDevice", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), Out(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), Out(Pointer(PDIRECT3DDEVICE8), "ppReturnedDeviceInterface")]),
+    Method(HRESULT, "GetAdapterIdentifier", [(D3DADAPTER, "Adapter"), (DWORD, "Flags"), Out(Pointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
+    Method(UINT, "GetAdapterModeCount", [(D3DADAPTER, "Adapter")]),
+    Method(HRESULT, "EnumAdapterModes", [(D3DADAPTER, "Adapter"), (UINT, "Mode"), Out(Pointer(D3DDISPLAYMODE), "pMode")]),
+    Method(HRESULT, "GetAdapterDisplayMode", [(D3DADAPTER, "Adapter"), Out(Pointer(D3DDISPLAYMODE), "pMode")]),
+    Method(HRESULT, "CheckDeviceType", [(D3DADAPTER, "Adapter"), (D3DDEVTYPE, "CheckType"), (D3DFORMAT, "DisplayFormat"), (D3DFORMAT, "BackBufferFormat"), (BOOL, "Windowed")]),
+    Method(HRESULT, "CheckDeviceFormat", [(D3DADAPTER, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (DWORD, "Usage"), (D3DRESOURCETYPE, "RType"), (D3DFORMAT, "CheckFormat")]),
+    Method(HRESULT, "CheckDeviceMultiSampleType", [(D3DADAPTER, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SurfaceFormat"), (BOOL, "Windowed"), (D3DMULTISAMPLE_TYPE, "MultiSampleType")]),
+    Method(HRESULT, "CheckDepthStencilMatch", [(D3DADAPTER, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "RenderTargetFormat"), (D3DFORMAT, "DepthStencilFormat")]),
+    Method(HRESULT, "GetDeviceCaps", [(D3DADAPTER, "Adapter"), (D3DDEVTYPE, "DeviceType"), Out(Pointer(D3DCAPS8), "pCaps")]),
+    Method(HMONITOR, "GetAdapterMonitor", [(D3DADAPTER, "Adapter")]),
+    Method(HRESULT, "CreateDevice", [(D3DADAPTER, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (D3DCREATE, "BehaviorFlags"), Out(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), Out(Pointer(PDIRECT3DDEVICE8), "ppReturnedDeviceInterface")]),
 ]
 
 IDirect3DDevice8.methods += [