if __name__ == '__main__':
+ print '#define INITGUID'
+ print
print '#include <windows.h>'
print '#include <d3d8.h>'
print '#include "d3dshader.hpp"'
#include <d3dx9.h>
+#ifndef D3DFMT_A2B10G10R10_XR_BIAS
+#define D3DFMT_A2B10G10R10_XR_BIAS 119
+#endif
+
#ifndef D3DFMT_ATI1
#define D3DFMT_ATI1 ((D3DFORMAT)MAKEFOURCC('A','T','I','1'))
#endif
if __name__ == '__main__':
+ print '#define INITGUID'
+ print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
"D3DFMT_A32B32G32R32F",
"D3DFMT_CxV8U8",
"D3DFMT_A1",
+ "D3DFMT_A2B10G10R10_XR_BIAS",
"D3DFMT_BINARYBUFFER",
# Unofficial formats
D3DVERTEXBUFFER_DESC = Struct("D3DVERTEXBUFFER_DESC", [
(D3DFORMAT, "Format"),
(D3DRESOURCETYPE, "Type"),
- (DWORD, "Usage"),
+ (D3DUSAGE, "Usage"),
(D3DPOOL, "Pool"),
(UINT, "Size"),
(DWORD, "FVF"),
D3DINDEXBUFFER_DESC = Struct("D3DINDEXBUFFER_DESC", [
(D3DFORMAT, "Format"),
(D3DRESOURCETYPE, "Type"),
- (DWORD, "Usage"),
+ (D3DUSAGE, "Usage"),
(D3DPOOL, "Pool"),
(UINT, "Size"),
])
D3DSURFACE_DESC = Struct("D3DSURFACE_DESC", [
(D3DFORMAT, "Format"),
(D3DRESOURCETYPE, "Type"),
- (DWORD, "Usage"),
+ (D3DUSAGE, "Usage"),
(D3DPOOL, "Pool"),
(D3DMULTISAMPLE_TYPE, "MultiSampleType"),
(DWORD, "MultiSampleQuality"),
D3DVOLUME_DESC = Struct("D3DVOLUME_DESC", [
(D3DFORMAT, "Format"),
(D3DRESOURCETYPE, "Type"),
- (DWORD, "Usage"),
+ (D3DUSAGE, "Usage"),
(D3DPOOL, "Pool"),
(UINT, "Width"),
(UINT, "Height"),
def wrapIid(self, riid, out):
print ' if (%s && *%s) {' % (out.name, out.name)
print ' if (*%s == m_pInstance) {' % (out.name,)
+ print ' AddRef();'
+ print ' m_pInstance->Release();'
print ' *%s = this;' % (out.name,)
print ' }'
- for iface in self.api.interfaces:
+ for iface in self.api.getAllInterfaces():
print r' else if (%s == IID_%s) {' % (riid.name, iface.name)
print r' *%s = new Wrap%s((%s *) *%s);' % (out.name, iface.name, iface.name, out.name)
print r' }'