This commit is contained in:
twinaphex 2018-05-12 19:24:04 +02:00
parent 58ac7c320e
commit be502a39fd
1 changed files with 20 additions and 5 deletions

View File

@ -26,17 +26,28 @@
typedef ID3DBlob* D3DBlob; typedef ID3DBlob* D3DBlob;
typedef ID3DDestructionNotifier* D3DDestructionNotifier; typedef ID3DDestructionNotifier* D3DDestructionNotifier;
#if !defined(__cplusplus) || defined(CINTERFACE) #if !defined(__cplusplus) || defined(CINTERFACE)
static INLINE ULONG D3DReleaseBlob(D3DBlob blob) { return blob->lpVtbl->Release(blob); } static INLINE ULONG D3DReleaseBlob(D3DBlob blob)
{
return blob->lpVtbl->Release(blob);
}
static INLINE LPVOID D3DGetBufferPointer(D3DBlob blob) static INLINE LPVOID D3DGetBufferPointer(D3DBlob blob)
{ {
return blob->lpVtbl->GetBufferPointer(blob); return blob->lpVtbl->GetBufferPointer(blob);
} }
static INLINE SIZE_T D3DGetBufferSize(D3DBlob blob) { return blob->lpVtbl->GetBufferSize(blob); } static INLINE SIZE_T D3DGetBufferSize(D3DBlob blob)
static INLINE ULONG D3DReleaseDestructionNotifier(D3DDestructionNotifier destruction_notifier) {
return blob->lpVtbl->GetBufferSize(blob);
}
static INLINE ULONG D3DReleaseDestructionNotifier(
D3DDestructionNotifier destruction_notifier)
{ {
return destruction_notifier->lpVtbl->Release(destruction_notifier); return destruction_notifier->lpVtbl->Release(destruction_notifier);
} }
static INLINE HRESULT D3DRegisterDestructionCallback( static INLINE HRESULT D3DRegisterDestructionCallback(
D3DDestructionNotifier destruction_notifier, D3DDestructionNotifier destruction_notifier,
PFN_DESTRUCTION_CALLBACK callback_fn, PFN_DESTRUCTION_CALLBACK callback_fn,
@ -46,8 +57,10 @@ static INLINE HRESULT D3DRegisterDestructionCallback(
return destruction_notifier->lpVtbl->RegisterDestructionCallback( return destruction_notifier->lpVtbl->RegisterDestructionCallback(
destruction_notifier, callback_fn, data, callback_id); destruction_notifier, callback_fn, data, callback_id);
} }
static INLINE HRESULT static INLINE HRESULT
D3DUnregisterDestructionCallback(D3DDestructionNotifier destruction_notifier, UINT callback_id) D3DUnregisterDestructionCallback(
D3DDestructionNotifier destruction_notifier, UINT callback_id)
{ {
return destruction_notifier->lpVtbl->UnregisterDestructionCallback( return destruction_notifier->lpVtbl->UnregisterDestructionCallback(
destruction_notifier, callback_id); destruction_notifier, callback_id);
@ -55,5 +68,7 @@ D3DUnregisterDestructionCallback(D3DDestructionNotifier destruction_notifier, UI
#endif #endif
/* end of auto-generated */ /* end of auto-generated */
bool d3d_compile(const char* src, size_t size, LPCSTR src_name, LPCSTR entrypoint, LPCSTR target, D3DBlob* out); bool d3d_compile(const char* src, size_t size,
LPCSTR src_name, LPCSTR entrypoint, LPCSTR target, D3DBlob* out);
bool d3d_compile_from_file(LPCWSTR filename, LPCSTR entrypoint, LPCSTR target, D3DBlob* out); bool d3d_compile_from_file(LPCWSTR filename, LPCSTR entrypoint, LPCSTR target, D3DBlob* out);