d3d8 too
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f2dd0ac3f1
commit
9a6a0e7393
12 changed files with 354 additions and 65 deletions
55
include/Mw/Widget/D3D8.h
Normal file
55
include/Mw/Widget/D3D8.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*!
|
||||
* @file Mw/Widget/D3D8.h
|
||||
* @brief D3D8 widget.
|
||||
* @warning Only avaliable on Windows.
|
||||
*/
|
||||
#ifndef __MW_WIDGET_D3D8_H__
|
||||
#define __MW_WIDGET_D3D8_H__
|
||||
|
||||
#include <Mw/Core.h>
|
||||
#include <Mw/MachDep.h>
|
||||
#include <Mw/TypeDefs.h>
|
||||
|
||||
#if !defined(MW_D3D8_NO_INCLUDE)
|
||||
|
||||
/* https://github.com/microsoft/Windows-classic-samples/issues/317 */
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#define NTDDI_VERSION 0x07000000
|
||||
#define _WIN32_WINNT 0x0A00
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#error D3D8 widget only avaliable for Win32 backends
|
||||
#else
|
||||
#ifdef MW_DIRECTX8
|
||||
#include <d3d8.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* @brief D3D8 widget class
|
||||
*/
|
||||
MWDECL MwClass MwD3D8Class;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
MwInline LPDIRECT3D8 MwDirectXGetD3D8(MwWidget handle) {
|
||||
LPDIRECT3D8 out = NULL;
|
||||
MwVaWidgetExecute(handle, "mwDirectXGetD3D8", &out, NULL);
|
||||
return out;
|
||||
};
|
||||
MwInline LPDIRECT3DDEVICE8 MwDirectXGetD3Dev8(MwWidget handle) {
|
||||
LPDIRECT3DDEVICE8 out = NULL;
|
||||
MwVaWidgetExecute(handle, "mwDirectXGetD3Dev8", &out);
|
||||
return out;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -3,27 +3,28 @@
|
|||
* @brief DirectX widget.
|
||||
* @warning Only avaliable on Windows.
|
||||
*/
|
||||
#ifndef __MW_WIDGET_DIRECTX_H__
|
||||
#define __MW_WIDGET_DIRECTX_H__
|
||||
#ifndef __MW_WIDGET_D3D9_H__
|
||||
#define __MW_WIDGET_D3D9_H__
|
||||
|
||||
#include <Mw/Core.h>
|
||||
#include <Mw/MachDep.h>
|
||||
#include <Mw/TypeDefs.h>
|
||||
|
||||
#if !defined(MW_DIRECTX_NO_INCLUDE)
|
||||
#if !defined(MW_D3D9_NO_INCLUDE)
|
||||
|
||||
/* https://github.com/microsoft/Windows-classic-samples/issues/317 */
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#define NTDDI_VERSION 0x07000000
|
||||
#define _WIN32_WINNT 0x0A00
|
||||
|
||||
#endif
|
||||
|
||||
#include <d3d9.h>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#error DirectX widget only avaliable for Win32 backends
|
||||
#error D3D9 widget only avaliable for Win32 backends
|
||||
#else
|
||||
#ifdef MW_DIRECTX9
|
||||
#include <d3d9.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Loading…
Add table
Add a link
Reference in a new issue