[PATCH 3/3] include: Add d3dx11tex.h

Andrey Gusev andrey.goosev at gmail.com
Fri Jun 3 04:22:50 CDT 2016


-------------- next part --------------
From b4a58de7be39d91ae6ab1312e20a1236d578e14f Mon Sep 17 00:00:00 2001
From: Andrey Gusev <andrey.goosev at gmail.com>
Date: Fri, 3 Jun 2016 12:03:19 +0300
Subject: [PATCH 3/3] include: Add d3dx11tex.h

Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
---
 include/Makefile.in |  1 +
 include/d3dx11.h    |  1 +
 include/d3dx11tex.h | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 include/d3dx11tex.h

diff --git a/include/Makefile.in b/include/Makefile.in
index b5a826a..66bf448 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -257,6 +257,7 @@ HEADER_SRCS = \
 	d3dx10async.h \
 	d3dx10tex.h \
 	d3dx11.h \
+	d3dx11tex.h \
 	d3dx9.h \
 	d3dx9anim.h \
 	d3dx9core.h \
diff --git a/include/d3dx11.h b/include/d3dx11.h
index 08a303d..de54034 100644
--- a/include/d3dx11.h
+++ b/include/d3dx11.h
@@ -28,5 +28,6 @@
 
 #include "d3d11.h"
 #include "d3dx11core.h"
+#include "d3dx11tex.h"
 
 #endif
diff --git a/include/d3dx11tex.h b/include/d3dx11tex.h
new file mode 100644
index 0000000..23867a7
--- /dev/null
+++ b/include/d3dx11tex.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2016 Andrey Gusev
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __D3DX11TEX_H__
+#define __D3DX11TEX_H__
+
+typedef enum D3DX11_IMAGE_FILE_FORMAT
+{
+    D3DX11_IFF_BMP         = 0,
+    D3DX11_IFF_JPG         = 1,
+    D3DX11_IFF_PNG         = 3,
+    D3DX11_IFF_DDS         = 4,
+    D3DX11_IFF_TIFF        = 10,
+    D3DX11_IFF_GIF         = 11,
+    D3DX11_IFF_WMP         = 12,
+    D3DX11_IFF_FORCE_DWORD = 0x7fffffff
+} D3DX11_IMAGE_FILE_FORMAT;
+
+typedef struct D3DX11_IMAGE_INFO
+{
+    UINT                     Width;
+    UINT                     Height;
+    UINT                     Depth;
+    UINT                     ArraySize;
+    UINT                     MipLevels;
+    UINT                     MiscFlags;
+    DXGI_FORMAT              Format;
+    D3D11_RESOURCE_DIMENSION ResourceDimension;
+    D3DX11_IMAGE_FILE_FORMAT ImageFileFormat;
+} D3DX11_IMAGE_INFO;
+
+typedef struct D3DX11_IMAGE_LOAD_INFO
+{
+    UINT              Width;
+    UINT              Height;
+    UINT              Depth;
+    UINT              FirstMipLevel;
+    UINT              MipLevels;
+    D3D11_USAGE       Usage;
+    UINT              BindFlags;
+    UINT              CpuAccessFlags;
+    UINT              MiscFlags;
+    DXGI_FORMAT       Format;
+    UINT              Filter;
+    UINT              MipFilter;
+    D3DX11_IMAGE_INFO *pSrcInfo;
+
+#ifdef __cplusplus
+    D3DX11_IMAGE_LOAD_INFO()
+    {
+        Width          = D3DX11_DEFAULT;
+        Height         = D3DX11_DEFAULT;
+        Depth          = D3DX11_DEFAULT;
+        FirstMipLevel  = D3DX11_DEFAULT;
+        MipLevels      = D3DX11_DEFAULT;
+        Usage          = (D3D11_USAGE)D3DX11_DEFAULT;
+        BindFlags      = D3DX11_DEFAULT;
+        CpuAccessFlags = D3DX11_DEFAULT;
+        MiscFlags      = D3DX11_DEFAULT;
+        Format         = DXGI_FORMAT_FROM_FILE;
+        Filter         = D3DX11_DEFAULT;
+        MipFilter      = D3DX11_DEFAULT;
+        pSrcInfo       = NULL;
+    }
+#endif
+} D3DX11_IMAGE_LOAD_INFO;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *src_data, SIZE_T src_data_size,
+        D3DX11_IMAGE_LOAD_INFO *loadinfo, ID3DX11ThreadPump *pump, ID3D11Resource **texture, HRESULT *hresult);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
-- 
2.5.5



More information about the wine-patches mailing list