├── Cache-mingw32.cmake ├── Cache-mingw64.cmake ├── Cache-msvc32.cmake ├── Cache-msvc64.cmake ├── Documentation └── License Agreements │ └── DirectX SDK EULA.txt ├── Include ├── d2d1.h ├── d2d1_1.h ├── d2d1_1helper.h ├── d2d1_2.h ├── d2d1_2helper.h ├── d2d1_3.h ├── d2d1_3helper.h ├── d2d1effectauthor.h ├── d2d1effectauthor_1.h ├── d2d1effecthelpers.h ├── d2d1effects.h ├── d2d1effects_1.h ├── d2d1helper.h ├── d2dbasetypes.h ├── d2derr.h ├── d3d.h ├── d3d10.h ├── d3d10_1.h ├── d3d10_1shader.h ├── d3d10effect.h ├── d3d10misc.h ├── d3d10sdklayers.h ├── d3d10shader.h ├── d3d11.h ├── d3d11_1.h ├── d3d11_2.h ├── d3d11_3.h ├── d3d11_4.h ├── d3d11sdklayers.h ├── d3d11shader.h ├── d3d11shadertracing.h ├── d3d12.h ├── d3d12sdklayers.h ├── d3d12shader.h ├── d3d12video.h ├── d3d8.h ├── d3d8caps.h ├── d3d8types.h ├── d3d9.h ├── d3d9caps.h ├── d3d9types.h ├── d3dcaps.h ├── d3dcommon.h ├── d3dcompiler.h ├── d3dcsx.h ├── d3dtypes.h ├── d3dvec.inl ├── d3dx10.h ├── d3dx10async.h ├── d3dx10core.h ├── d3dx10math.h ├── d3dx10math.inl ├── d3dx10mesh.h ├── d3dx10tex.h ├── d3dx11.h ├── d3dx11async.h ├── d3dx11core.h ├── d3dx11tex.h ├── d3dx9.h ├── d3dx9anim.h ├── d3dx9core.h ├── d3dx9effect.h ├── d3dx9math.h ├── d3dx9math.inl ├── d3dx9mesh.h ├── d3dx9shader.h ├── d3dx9shape.h ├── d3dx9tex.h ├── d3dx9xof.h ├── d3dx_dxgiformatconvert.inl ├── dcommon.h ├── dcomp.h ├── dcompanimation.h ├── dcomptypes.h ├── ddraw.h ├── dwrite.h ├── dwrite_1.h ├── dwrite_2.h ├── dwrite_3.h ├── dxgi.h ├── dxgi1_2.h ├── dxgi1_3.h ├── dxgi1_4.h ├── dxgi1_5.h ├── dxgi1_6.h ├── dxgicommon.h ├── dxgidebug.h ├── dxgiformat.h ├── dxgitype.h └── dxva2api.h ├── Lib ├── .gitignore ├── Makefile ├── x64 │ ├── Makefile │ ├── d3d10.def │ ├── d3d10_1.def │ ├── d3d11.def │ ├── d3d9.def │ ├── d3dx10.def │ ├── d3dx9.def │ └── dxgi.def └── x86 │ ├── Makefile │ ├── d3d10.def │ ├── d3d10_1.def │ ├── d3d11.def │ ├── d3d9.def │ ├── d3dx10.def │ ├── d3dx9.def │ └── dxgi.def └── README.markdown /Cache-mingw32.cmake: -------------------------------------------------------------------------------- 1 | set (DirectX_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "" FORCE) 2 | 3 | set (DirectX_DDRAW_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 4 | set (DirectX_D3D_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 5 | set (DirectX_D3D8_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 6 | set (DirectX_D3D8_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 7 | set (DirectX_D3D9_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 8 | set (DirectX_D3DX9_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 9 | set (DirectX_DXGI_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 10 | set (DirectX_DXGI1_2_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 11 | set (DirectX_DXGI1_3_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 12 | set (DirectX_DXGI1_4_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 13 | set (DirectX_DXGI1_5_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 14 | set (DirectX_D3D10_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 15 | set (DirectX_D3D10_1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 16 | set (DirectX_D3DX10_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 17 | set (DirectX_D3D11_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 18 | set (DirectX_D3D11_1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 19 | set (DirectX_D3D11_2_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 20 | set (DirectX_D3D11_3_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 21 | set (DirectX_D3D11_4_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 22 | set (DirectX_D2D1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 23 | set (DirectX_D2D1_1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 24 | 25 | set (DirectX_D3D9_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd3d9.a" CACHE FILEPATH "" FORCE) 26 | set (DirectX_D3DX9_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd3dx9.a" CACHE FILEPATH "" FORCE) 27 | set (DirectX_D3D10_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd3d10.a" CACHE FILEPATH "" FORCE) 28 | set (DirectX_D3D10_1_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd3d10_1.a" CACHE FILEPATH "" FORCE) 29 | set (DirectX_D3DX10_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd3dx10.a" CACHE FILEPATH "" FORCE) 30 | set (DirectX_D3D11_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd3d11.a" CACHE FILEPATH "" FORCE) 31 | set (DirectX_D2D1_LIBRARY "${DirectX_ROOT_DIR}/Lib/x86/libd2d1.a" CACHE FILEPATH "" FORCE) 32 | -------------------------------------------------------------------------------- /Cache-mingw64.cmake: -------------------------------------------------------------------------------- 1 | set (DirectX_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "" FORCE) 2 | 3 | set (DirectX_DDRAW_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 4 | set (DirectX_D3D_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 5 | set (DirectX_D3D8_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 6 | set (DirectX_D3D8_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 7 | set (DirectX_D3D9_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 8 | set (DirectX_D3DX9_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 9 | set (DirectX_DXGI_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 10 | set (DirectX_DXGI1_2_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 11 | set (DirectX_DXGI1_3_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 12 | set (DirectX_DXGI1_4_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 13 | set (DirectX_DXGI1_5_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 14 | set (DirectX_D3D10_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 15 | set (DirectX_D3D10_1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 16 | set (DirectX_D3DX10_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 17 | set (DirectX_D3D11_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 18 | set (DirectX_D3D11_1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 19 | set (DirectX_D3D11_2_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 20 | set (DirectX_D3D11_3_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 21 | set (DirectX_D3D11_4_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 22 | set (DirectX_D2D1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 23 | set (DirectX_D2D1_1_INCLUDE_DIR "${DirectX_ROOT_DIR}/Include" CACHE PATH "" FORCE) 24 | 25 | set (DirectX_D3D9_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd3d9.a" CACHE FILEPATH "" FORCE) 26 | set (DirectX_D3DX9_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd3dx9.a" CACHE FILEPATH "" FORCE) 27 | set (DirectX_D3D10_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd3d10.a" CACHE FILEPATH "" FORCE) 28 | set (DirectX_D3D10_1_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd3d10_1.a" CACHE FILEPATH "" FORCE) 29 | set (DirectX_D3DX10_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd3dx10.a" CACHE FILEPATH "" FORCE) 30 | set (DirectX_D3D11_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd3d11.a" CACHE FILEPATH "" FORCE) 31 | set (DirectX_D2D1_LIBRARY "${DirectX_ROOT_DIR}/Lib/x64/libd2d1.a" CACHE FILEPATH "" FORCE) 32 | -------------------------------------------------------------------------------- /Cache-msvc32.cmake: -------------------------------------------------------------------------------- 1 | set (DirectX_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "" FORCE) 2 | 3 | # DirectX 7 4 | set (DirectX_D3D_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/Include" CACHE PATH "" FORCE) 5 | set (DirectX_D3DX_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/Include" CACHE PATH "" FORCE) 6 | set (DirectX_D3DX_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/Lib/d3dx.lib" CACHE FILEPATH "" FORCE) 7 | 8 | # DirectX 8 9 | set (DirectX_D3D8_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/Include" CACHE PATH "" FORCE) 10 | set (DirectX_D3D8_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/Lib/x86/d3d8.lib" CACHE FILEPATH "" FORCE) 11 | set (DirectX_D3DX8_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/Include" CACHE PATH "" FORCE) 12 | set (DirectX_D3DX8_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/Lib/d3dx8.lib" CACHE FILEPATH "" FORCE) 13 | -------------------------------------------------------------------------------- /Cache-msvc64.cmake: -------------------------------------------------------------------------------- 1 | set (DirectX_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "" FORCE) 2 | 3 | # DirectX 7 4 | set (DirectX_D3D_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/Include" CACHE PATH "" FORCE) 5 | -------------------------------------------------------------------------------- /Documentation/License Agreements/DirectX SDK EULA.txt: -------------------------------------------------------------------------------- 1 | MICROSOFT SOFTWARE LICENSE TERMS 2 | MICROSOFT DIRECTX SOFTWARE DEVELOPMENT KIT (SDK) 3 | These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft 4 | • updates, 5 | • supplements, 6 | • Internet-based services, and 7 | • support services 8 | for this software, unless other terms accompany those items. If so, those terms apply. 9 | BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. 10 | If you comply with these license terms, you have the rights below. 11 | 1. INSTALLATION AND USE RIGHTS. 12 | a. Installation and Use. You may install and use any number of copies of the software on your devices. 13 | b. Included Microsoft Programs. The software contains other Microsoft programs. The license terms with those programs apply to your use of them. 14 | 2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS. 15 | a. Media Elements and Templates. You may copy and use images, clip art, animations, sounds, music, shapes, video clips and templates provided with the software and identified for such use in documents and projects that you create. You may distribute those documents and projects non-commercially. If you wish to use these media elements or templates for any other purpose, go to www.microsoft.com/permission to learn whether that use is allowed. 16 | b. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below. 17 | i. Right to Use and Distribute. The code and text files listed below are “Distributable Code.” 18 | • DIRECTX REDIST.TXT Files. You may copy and distribute the object code form of code listed in DIRECTX REDIST.TXT files. 19 | • Sample Code. You may modify, copy, and distribute the source and object code form of code marked as “sample”, as well as those marked as follows: 20 | \Utilities\bin\x86\dxerr 21 | \Utilities\bin\x64\dxerr 22 | \Utilities\bin\x86\dxtex 23 | \Utilities\bin\x64\dxtex 24 | \Utilities\bin\x86\DxViewer 25 | \Utilities\bin\x64\DxViewer 26 | \Utilities\bin\x86\GDFTrace 27 | \Utilities\bin\x64\GDFTrace 28 | \Utilities\bin\x86\MeshConvert 29 | \Utilities\bin\x64\MeshConvert 30 | \Utilities\Source\Sas 31 | \Utilities\Source\Effects11 32 | • Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs. 33 | ii. Distribution Requirements. For any Distributable Code you distribute, you must 34 | • add significant primary functionality to it in your programs; 35 | • require distributors and external end users to agree to terms that protect it at least as much as this agreement; 36 | • display your valid copyright notice on your programs; and 37 | • indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs. 38 | iii. Distribution Restrictions. You may not 39 | • alter any copyright, trademark or patent notice in the Distributable Code; 40 | • use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft; 41 | • distribute Distributable Code to run on a platform other than the Windows, Xbox and Windows Mobile platforms; 42 | • include Distributable Code in malicious, deceptive or unlawful programs; or 43 | • modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that 44 | • the code be disclosed or distributed in source code form; or 45 | • others have the right to modify it. 46 | 3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not 47 | • disclose the results of any benchmark tests of the software to any third party without Microsoft’s prior written approval; 48 | • work around any technical limitations in the software; 49 | • reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation; 50 | • make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation; 51 | • publish the software for others to copy; 52 | • rent, lease or lend the software; or 53 | • use the software for commercial software hosting services. 54 | 4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software. 55 | 5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes. 56 | 6. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting. 57 | 7. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it. 58 | 8. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services. 59 | 9. APPLICABLE LAW. 60 | a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort. 61 | b. Outside the United States. If you acquired the software in any other country, the laws of that country apply. 62 | 10. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so. 63 | 11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 64 | 12. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES. 65 | This limitation applies to 66 | • anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and 67 | • claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. 68 | It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages. 69 | Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French. 70 | Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français. 71 | EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues. 72 | LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices. 73 | Cette limitation concerne : 74 | • tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et 75 | • les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur. 76 | Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard. 77 | EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas. 78 | -------------------------------------------------------------------------------- /Include/d2d1_2.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // This file is automatically generated. Please do not edit it directly. 5 | // 6 | // File name: D2D1_2.h 7 | //--------------------------------------------------------------------------- 8 | #ifdef _MSC_VER 9 | #pragma once 10 | #endif // #ifdef _MSC_VER 11 | 12 | #ifndef _D2D1_2_H_ 13 | #define _D2D1_2_H_ 14 | 15 | #ifndef _D2D1_1_H_ 16 | #include 17 | #endif // #ifndef _D2D1_1_H_ 18 | #ifndef _D2D1_EFFECTS_1_ 19 | #include 20 | #endif // #ifndef _D2D1_EFFECTS_1_ 21 | 22 | 23 | 24 | #ifndef D2D_USE_C_DEFINITIONS 25 | 26 | interface ID2D1Device1; 27 | #else 28 | 29 | typedef interface ID2D1Device1 ID2D1Device1; 30 | 31 | #endif 32 | 33 | /// 34 | /// Specifies the extent to which D2D will throttle work sent to the GPU. 35 | /// 36 | typedef enum D2D1_RENDERING_PRIORITY 37 | { 38 | D2D1_RENDERING_PRIORITY_NORMAL = 0, 39 | D2D1_RENDERING_PRIORITY_LOW = 1, 40 | D2D1_RENDERING_PRIORITY_FORCE_DWORD = 0xffffffff 41 | 42 | } D2D1_RENDERING_PRIORITY; 43 | 44 | 45 | EXTERN_C CONST IID IID_ID2D1GeometryRealization; 46 | EXTERN_C CONST IID IID_ID2D1DeviceContext1; 47 | EXTERN_C CONST IID IID_ID2D1Device1; 48 | EXTERN_C CONST IID IID_ID2D1Factory2; 49 | EXTERN_C CONST IID IID_ID2D1CommandSink1; 50 | 51 | 52 | #ifndef D2D_USE_C_DEFINITIONS 53 | 54 | 55 | /// 56 | /// Encapsulates a device- and transform-dependent representation of a filled or 57 | /// stroked geometry. 58 | /// 59 | interface DX_DECLARE_INTERFACE("a16907d7-bc02-4801-99e8-8cf7f485f774") ID2D1GeometryRealization : public ID2D1Resource 60 | { 61 | }; // interface ID2D1GeometryRealization 62 | 63 | 64 | /// 65 | /// Enables creation and drawing of geometry realization objects. 66 | /// 67 | interface DX_DECLARE_INTERFACE("d37f57e4-6908-459f-a199-e72f24f79987") ID2D1DeviceContext1 : public ID2D1DeviceContext 68 | { 69 | 70 | STDMETHOD(CreateFilledGeometryRealization)( 71 | _In_ ID2D1Geometry *geometry, 72 | FLOAT flatteningTolerance, 73 | _COM_Outptr_ ID2D1GeometryRealization **geometryRealization 74 | ) PURE; 75 | 76 | STDMETHOD(CreateStrokedGeometryRealization)( 77 | _In_ ID2D1Geometry *geometry, 78 | FLOAT flatteningTolerance, 79 | FLOAT strokeWidth, 80 | _In_opt_ ID2D1StrokeStyle *strokeStyle, 81 | _COM_Outptr_ ID2D1GeometryRealization **geometryRealization 82 | ) PURE; 83 | 84 | STDMETHOD_(void, DrawGeometryRealization)( 85 | _In_ ID2D1GeometryRealization *geometryRealization, 86 | _In_ ID2D1Brush *brush 87 | ) PURE; 88 | }; // interface ID2D1DeviceContext1 89 | 90 | 91 | /// 92 | /// Represents a resource domain whose objects and device contexts can be used 93 | /// together. 94 | /// 95 | interface DX_DECLARE_INTERFACE("d21768e1-23a4-4823-a14b-7c3eba85d658") ID2D1Device1 : public ID2D1Device 96 | { 97 | 98 | /// 99 | /// Retrieves the rendering priority currently set on the device. 100 | /// 101 | STDMETHOD_(D2D1_RENDERING_PRIORITY, GetRenderingPriority)( 102 | ) PURE; 103 | 104 | /// 105 | /// Sets the rendering priority of the device. 106 | /// 107 | STDMETHOD_(void, SetRenderingPriority)( 108 | D2D1_RENDERING_PRIORITY renderingPriority 109 | ) PURE; 110 | 111 | /// 112 | /// Creates a new device context with no initially assigned target. 113 | /// 114 | STDMETHOD(CreateDeviceContext)( 115 | D2D1_DEVICE_CONTEXT_OPTIONS options, 116 | _COM_Outptr_ ID2D1DeviceContext1 **deviceContext1 117 | ) PURE; 118 | 119 | using ID2D1Device::CreateDeviceContext; 120 | }; // interface ID2D1Device1 121 | 122 | 123 | /// 124 | /// Creates Direct2D resources. This interface also enables the creation of 125 | /// ID2D1Device1 objects. 126 | /// 127 | interface DX_DECLARE_INTERFACE("94f81a73-9212-4376-9c58-b16a3a0d3992") ID2D1Factory2 : public ID2D1Factory1 128 | { 129 | 130 | /// 131 | /// This creates a new Direct2D device from the given IDXGIDevice. 132 | /// 133 | STDMETHOD(CreateDevice)( 134 | _In_ IDXGIDevice *dxgiDevice, 135 | _COM_Outptr_ ID2D1Device1 **d2dDevice1 136 | ) PURE; 137 | 138 | using ID2D1Factory1::CreateDevice; 139 | }; // interface ID2D1Factory2 140 | 141 | 142 | /// 143 | /// This interface performs all the same functions as the existing ID2D1CommandSink 144 | /// interface. It also enables access to the new primitive blend modes, MIN and ADD, 145 | /// through its SetPrimitiveBlend1 method. 146 | /// 147 | interface DX_DECLARE_INTERFACE("9eb767fd-4269-4467-b8c2-eb30cb305743") ID2D1CommandSink1 : public ID2D1CommandSink 148 | { 149 | 150 | /// 151 | /// This method is called if primitiveBlend value was added after Windows 8. 152 | /// SetPrimitiveBlend method is used for Win8 values (_SOURCE_OVER and _COPY). 153 | /// 154 | STDMETHOD(SetPrimitiveBlend1)( 155 | D2D1_PRIMITIVE_BLEND primitiveBlend 156 | ) PURE; 157 | }; // interface ID2D1CommandSink1 158 | 159 | 160 | 161 | #endif 162 | 163 | 164 | #ifdef D2D_USE_C_DEFINITIONS 165 | 166 | 167 | typedef interface ID2D1GeometryRealization ID2D1GeometryRealization; 168 | 169 | typedef interface ID2D1DeviceContext1 ID2D1DeviceContext1; 170 | 171 | typedef interface ID2D1Device1 ID2D1Device1; 172 | 173 | typedef interface ID2D1Factory2 ID2D1Factory2; 174 | 175 | typedef interface ID2D1CommandSink1 ID2D1CommandSink1; 176 | 177 | #endif 178 | 179 | 180 | #ifdef __cplusplus 181 | extern "C" 182 | { 183 | #endif 184 | 185 | #if NTDDI_VERSION >= NTDDI_WINBLUE 186 | FLOAT WINAPI 187 | D2D1ComputeMaximumScaleFactor( 188 | _In_ CONST D2D1_MATRIX_3X2_F *matrix 189 | ); 190 | #endif // #if NTDDI_VERSION >= NTDDI_WINBLUE 191 | 192 | #ifdef __cplusplus 193 | } 194 | #endif 195 | 196 | 197 | 198 | #include 199 | #endif // #ifndef _D2D1_2_H_ 200 | -------------------------------------------------------------------------------- /Include/d2d1_2helper.h: -------------------------------------------------------------------------------- 1 | 2 | /*=========================================================================*\ 3 | 4 | Copyright (c) Microsoft Corporation. All rights reserved. 5 | 6 | File: D2D1_2Helper.h 7 | 8 | Module Name: D2D 9 | 10 | Description: Helper files over the D2D interfaces and APIs. 11 | 12 | \*=========================================================================*/ 13 | 14 | #ifdef _MSC_VER 15 | #pragma once 16 | #endif // _MSC_VER 17 | 18 | #ifndef _D2D1_2HELPER_H_ 19 | #define _D2D1_2HELPER_H_ 20 | 21 | #if NTDDI_VERSION >= NTDDI_WINBLUE 22 | 23 | #ifndef _D2D1_2_H_ 24 | #include 25 | #endif // #ifndef _D2D1_2_H_ 26 | 27 | #ifndef D2D_USE_C_DEFINITIONS 28 | 29 | 30 | 31 | namespace D2D1 32 | { 33 | COM_DECLSPEC_NOTHROW 34 | D2D1FORCEINLINE 35 | FLOAT 36 | ComputeFlatteningTolerance( 37 | _In_ CONST D2D1_MATRIX_3X2_F &matrix, 38 | FLOAT dpiX = 96.0f, 39 | FLOAT dpiY = 96.0f, 40 | FLOAT maxZoomFactor = 1.0f 41 | ) 42 | { 43 | D2D1_MATRIX_3X2_F dpiDependentTransform = 44 | matrix * D2D1::Matrix3x2F::Scale(dpiX / 96.0f, dpiY / 96.0f); 45 | 46 | FLOAT absMaxZoomFactor = (maxZoomFactor > 0) ? maxZoomFactor : -maxZoomFactor; 47 | 48 | return D2D1_DEFAULT_FLATTENING_TOLERANCE / 49 | (absMaxZoomFactor * D2D1ComputeMaximumScaleFactor(&dpiDependentTransform)); 50 | } 51 | 52 | } // namespace D2D1 53 | 54 | 55 | #endif // #ifndef D2D_USE_C_DEFINITIONS 56 | 57 | #endif // #if NTDDI_VERSION >= NTDDI_WINBLUE 58 | 59 | #endif // #ifndef _D2D1_HELPER_H_ 60 | 61 | -------------------------------------------------------------------------------- /Include/d2d1_3helper.h: -------------------------------------------------------------------------------- 1 | 2 | /*=========================================================================*\ 3 | 4 | Copyright (c) Microsoft Corporation. All rights reserved. 5 | 6 | File: D2D1_3Helper.h 7 | 8 | Module Name: D2D 9 | 10 | Description: Helper files over the D2D interfaces and APIs. 11 | 12 | \*=========================================================================*/ 13 | 14 | #ifdef _MSC_VER 15 | #pragma once 16 | #endif // _MSC_VER 17 | 18 | #ifndef _D2D1_3HELPER_H_ 19 | #define _D2D1_3HELPER_H_ 20 | 21 | #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD 22 | 23 | #ifndef _D2D1_3_H_ 24 | #include 25 | #endif // #ifndef _D2D1_3_H_ 26 | 27 | #ifndef D2D_USE_C_DEFINITIONS 28 | 29 | 30 | 31 | namespace D2D1 32 | { 33 | COM_DECLSPEC_NOTHROW 34 | D2D1FORCEINLINE 35 | D2D1_GRADIENT_MESH_PATCH 36 | GradientMeshPatch( 37 | D2D1_POINT_2F point00, 38 | D2D1_POINT_2F point01, 39 | D2D1_POINT_2F point02, 40 | D2D1_POINT_2F point03, 41 | D2D1_POINT_2F point10, 42 | D2D1_POINT_2F point11, 43 | D2D1_POINT_2F point12, 44 | D2D1_POINT_2F point13, 45 | D2D1_POINT_2F point20, 46 | D2D1_POINT_2F point21, 47 | D2D1_POINT_2F point22, 48 | D2D1_POINT_2F point23, 49 | D2D1_POINT_2F point30, 50 | D2D1_POINT_2F point31, 51 | D2D1_POINT_2F point32, 52 | D2D1_POINT_2F point33, 53 | D2D1_COLOR_F color00, 54 | D2D1_COLOR_F color03, 55 | D2D1_COLOR_F color30, 56 | D2D1_COLOR_F color33, 57 | D2D1_PATCH_EDGE_MODE topEdgeMode, 58 | D2D1_PATCH_EDGE_MODE leftEdgeMode, 59 | D2D1_PATCH_EDGE_MODE bottomEdgeMode, 60 | D2D1_PATCH_EDGE_MODE rightEdgeMode 61 | ) 62 | { 63 | D2D1_GRADIENT_MESH_PATCH newPatch; 64 | newPatch.point00 = point00; 65 | newPatch.point01 = point01; 66 | newPatch.point02 = point02; 67 | newPatch.point03 = point03; 68 | newPatch.point10 = point10; 69 | newPatch.point11 = point11; 70 | newPatch.point12 = point12; 71 | newPatch.point13 = point13; 72 | newPatch.point20 = point20; 73 | newPatch.point21 = point21; 74 | newPatch.point22 = point22; 75 | newPatch.point23 = point23; 76 | newPatch.point30 = point30; 77 | newPatch.point31 = point31; 78 | newPatch.point32 = point32; 79 | newPatch.point33 = point33; 80 | 81 | newPatch.color00 = color00; 82 | newPatch.color03 = color03; 83 | newPatch.color30 = color30; 84 | newPatch.color33 = color33; 85 | 86 | newPatch.topEdgeMode = topEdgeMode; 87 | newPatch.leftEdgeMode = leftEdgeMode; 88 | newPatch.bottomEdgeMode = bottomEdgeMode; 89 | newPatch.rightEdgeMode = rightEdgeMode; 90 | 91 | return newPatch; 92 | } 93 | 94 | COM_DECLSPEC_NOTHROW 95 | D2D1FORCEINLINE 96 | D2D1_GRADIENT_MESH_PATCH 97 | GradientMeshPatchFromCoonsPatch( 98 | D2D1_POINT_2F point0, 99 | D2D1_POINT_2F point1, 100 | D2D1_POINT_2F point2, 101 | D2D1_POINT_2F point3, 102 | D2D1_POINT_2F point4, 103 | D2D1_POINT_2F point5, 104 | D2D1_POINT_2F point6, 105 | D2D1_POINT_2F point7, 106 | D2D1_POINT_2F point8, 107 | D2D1_POINT_2F point9, 108 | D2D1_POINT_2F point10, 109 | D2D1_POINT_2F point11, 110 | D2D1_COLOR_F color0, 111 | D2D1_COLOR_F color1, 112 | D2D1_COLOR_F color2, 113 | D2D1_COLOR_F color3, 114 | D2D1_PATCH_EDGE_MODE topEdgeMode, 115 | D2D1_PATCH_EDGE_MODE leftEdgeMode, 116 | D2D1_PATCH_EDGE_MODE bottomEdgeMode, 117 | D2D1_PATCH_EDGE_MODE rightEdgeMode 118 | ) 119 | { 120 | D2D1_GRADIENT_MESH_PATCH newPatch; 121 | newPatch.point00 = point0; 122 | newPatch.point01 = point1; 123 | newPatch.point02 = point2; 124 | newPatch.point03 = point3; 125 | newPatch.point13 = point4; 126 | newPatch.point23 = point5; 127 | newPatch.point33 = point6; 128 | newPatch.point32 = point7; 129 | newPatch.point31 = point8; 130 | newPatch.point30 = point9; 131 | newPatch.point20 = point10; 132 | newPatch.point10 = point11; 133 | 134 | D2D1GetGradientMeshInteriorPointsFromCoonsPatch( 135 | &point0, 136 | &point1, 137 | &point2, 138 | &point3, 139 | &point4, 140 | &point5, 141 | &point6, 142 | &point7, 143 | &point8, 144 | &point9, 145 | &point10, 146 | &point11, 147 | &newPatch.point11, 148 | &newPatch.point12, 149 | &newPatch.point21, 150 | &newPatch.point22 151 | ); 152 | 153 | newPatch.color00 = color0; 154 | newPatch.color03 = color1; 155 | newPatch.color33 = color2; 156 | newPatch.color30 = color3; 157 | newPatch.topEdgeMode = topEdgeMode; 158 | newPatch.leftEdgeMode = leftEdgeMode; 159 | newPatch.bottomEdgeMode = bottomEdgeMode; 160 | newPatch.rightEdgeMode = rightEdgeMode; 161 | 162 | return newPatch; 163 | } 164 | 165 | COM_DECLSPEC_NOTHROW 166 | D2D1FORCEINLINE 167 | D2D1_INK_POINT 168 | InkPoint( 169 | const D2D1_POINT_2F &point, 170 | FLOAT radius 171 | ) 172 | { 173 | D2D1_INK_POINT inkPoint; 174 | 175 | inkPoint.x = point.x; 176 | inkPoint.y = point.y; 177 | inkPoint.radius = radius; 178 | 179 | return inkPoint; 180 | } 181 | 182 | COM_DECLSPEC_NOTHROW 183 | D2D1FORCEINLINE 184 | D2D1_INK_BEZIER_SEGMENT 185 | InkBezierSegment( 186 | const D2D1_INK_POINT &point1, 187 | const D2D1_INK_POINT &point2, 188 | const D2D1_INK_POINT &point3 189 | ) 190 | { 191 | D2D1_INK_BEZIER_SEGMENT inkBezierSegment; 192 | 193 | inkBezierSegment.point1 = point1; 194 | inkBezierSegment.point2 = point2; 195 | inkBezierSegment.point3 = point3; 196 | 197 | return inkBezierSegment; 198 | } 199 | 200 | COM_DECLSPEC_NOTHROW 201 | D2D1FORCEINLINE 202 | D2D1_INK_STYLE_PROPERTIES 203 | InkStyleProperties( 204 | D2D1_INK_NIB_SHAPE nibShape, 205 | const D2D1_MATRIX_3X2_F &nibTransform 206 | ) 207 | { 208 | D2D1_INK_STYLE_PROPERTIES inkStyleProperties; 209 | 210 | inkStyleProperties.nibShape = nibShape; 211 | inkStyleProperties.nibTransform = nibTransform; 212 | 213 | return inkStyleProperties; 214 | } 215 | 216 | COM_DECLSPEC_NOTHROW 217 | D2D1FORCEINLINE 218 | D2D1_RECT_U 219 | InfiniteRectU() 220 | { 221 | D2D1_RECT_U rect = { 0u, 0u, UINT_MAX, UINT_MAX }; 222 | 223 | return rect; 224 | } 225 | 226 | COM_DECLSPEC_NOTHROW 227 | D2D1FORCEINLINE 228 | D2D1_SIMPLE_COLOR_PROFILE 229 | SimpleColorProfile( 230 | const D2D1_POINT_2F &redPrimary, 231 | const D2D1_POINT_2F &greenPrimary, 232 | const D2D1_POINT_2F &bluePrimary, 233 | const D2D1_GAMMA1 gamma, 234 | const D2D1_POINT_2F &whitePointXZ 235 | ) 236 | { 237 | D2D1_SIMPLE_COLOR_PROFILE simpleColorProfile; 238 | 239 | simpleColorProfile.redPrimary = redPrimary; 240 | simpleColorProfile.greenPrimary = greenPrimary; 241 | simpleColorProfile.bluePrimary = bluePrimary; 242 | simpleColorProfile.gamma = gamma; 243 | simpleColorProfile.whitePointXZ = whitePointXZ; 244 | 245 | return simpleColorProfile; 246 | } 247 | } // namespace D2D1 248 | 249 | 250 | #endif // #ifndef D2D_USE_C_DEFINITIONS 251 | 252 | #endif // #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD 253 | 254 | #endif // #ifndef _D2D1_HELPER_H_ 255 | 256 | -------------------------------------------------------------------------------- /Include/d2d1effectauthor_1.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // This file is automatically generated. Please do not edit it directly. 5 | // 6 | // File name: D2D1EffectAuthor_1.h 7 | //--------------------------------------------------------------------------- 8 | #ifdef _MSC_VER 9 | #pragma once 10 | #endif // #ifdef _MSC_VER 11 | 12 | #ifndef _D2D1_EFFECT_AUTHOR_1_H_ 13 | #define _D2D1_EFFECT_AUTHOR_1_H_ 14 | 15 | #ifndef _D2D1_3_H_ 16 | #include 17 | #endif // #ifndef _D2D1_3_H_ 18 | #ifndef _D2D1_EFFECT_AUTHOR_H_ 19 | #include 20 | #endif // #ifndef _D2D1_EFFECT_AUTHOR_H_ 21 | 22 | EXTERN_C CONST IID IID_ID2D1EffectContext1; 23 | EXTERN_C CONST IID IID_ID2D1EffectContext2; 24 | 25 | 26 | #ifndef D2D_USE_C_DEFINITIONS 27 | 28 | 29 | /// 30 | /// The internal context handed to effect authors to create transforms from effects 31 | /// and any other operation tied to context which is not useful to the application 32 | /// facing API. 33 | /// 34 | interface DX_DECLARE_INTERFACE("84ab595a-fc81-4546-bacd-e8ef4d8abe7a") ID2D1EffectContext1 : public ID2D1EffectContext 35 | { 36 | 37 | /// 38 | /// Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. 39 | /// The table data must be provided in 4-channel format. 40 | /// 41 | STDMETHOD(CreateLookupTable3D)( 42 | D2D1_BUFFER_PRECISION precision, 43 | _In_reads_(3) CONST UINT32 *extents, 44 | _In_reads_(dataCount) CONST BYTE *data, 45 | UINT32 dataCount, 46 | _In_reads_(2) CONST UINT32 *strides, 47 | _COM_Outptr_ ID2D1LookupTable3D **lookupTable 48 | ) PURE; 49 | }; // interface ID2D1EffectContext1 50 | 51 | 52 | #if NTDDI_VERSION >= NTDDI_WIN10_RS2 53 | 54 | /// 55 | /// The internal context handed to effect authors to create transforms from effects 56 | /// and any other operation tied to context which is not useful to the application 57 | /// facing API. 58 | /// 59 | interface DX_DECLARE_INTERFACE("577ad2a0-9fc7-4dda-8b18-dab810140052") ID2D1EffectContext2 : public ID2D1EffectContext1 60 | { 61 | 62 | /// 63 | /// Creates a color context from a DXGI color space type. It is only valid to use 64 | /// this with the Color Management Effect in 'Best' mode. 65 | /// 66 | STDMETHOD(CreateColorContextFromDxgiColorSpace)( 67 | DXGI_COLOR_SPACE_TYPE colorSpace, 68 | _COM_Outptr_ ID2D1ColorContext1 **colorContext 69 | ) PURE; 70 | 71 | /// 72 | /// Creates a color context from a simple color profile. It is only valid to use 73 | /// this with the Color Management Effect in 'Best' mode. 74 | /// 75 | STDMETHOD(CreateColorContextFromSimpleColorProfile)( 76 | _In_ CONST D2D1_SIMPLE_COLOR_PROFILE *simpleProfile, 77 | _COM_Outptr_ ID2D1ColorContext1 **colorContext 78 | ) PURE; 79 | }; // interface ID2D1EffectContext2 80 | 81 | 82 | #endif 83 | 84 | #endif 85 | 86 | 87 | #ifdef D2D_USE_C_DEFINITIONS 88 | 89 | 90 | typedef interface ID2D1EffectContext1 ID2D1EffectContext1; 91 | #if NTDDI_VERSION >= NTDDI_WIN10_RS2 92 | 93 | typedef interface ID2D1EffectContext2 ID2D1EffectContext2; 94 | #endif 95 | 96 | #endif 97 | 98 | #endif // #ifndef _D2D1_EFFECT_AUTHOR_1_H_ 99 | -------------------------------------------------------------------------------- /Include/d2d1effecthelpers.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // D2D helper functions for effect authors. 5 | // 6 | // File name: D2D1EffectHelpers.h 7 | //--------------------------------------------------------------------------- 8 | #pragma once 9 | 10 | #ifndef _D2D1_EFFECT_HELPERS_H_ 11 | #define _D2D1_EFFECT_HELPERS_H_ 12 | 13 | 14 | 15 | #include 16 | 17 | //+----------------------------------------------------------------------------- 18 | // 19 | // Function: 20 | // DeducingValueSetter 21 | // 22 | // Synopsis: 23 | // Deduces the class and arguments and then calls a member-function property 24 | // setter callback for a value-type property. 25 | // 26 | // This should not be called directly. 27 | // 28 | //-------------------------------------------------------------------------------- 29 | template 30 | HRESULT DeducingValueSetter( 31 | _In_ HRESULT (C::*callback)(P), 32 | _In_ I *effect, 33 | _In_reads_(dataSize) const BYTE *data, 34 | UINT32 dataSize 35 | ) 36 | { 37 | // We must exactly match the value-type's size. 38 | if (dataSize != sizeof(P)) 39 | { 40 | return E_INVALIDARG; 41 | } 42 | 43 | return (static_cast(effect)->*callback)(*reinterpret_cast(data)); 44 | } 45 | 46 | //+----------------------------------------------------------------------------- 47 | // 48 | // Function: 49 | // ValueSetter 50 | // 51 | // Synopsis: 52 | // Calls a member-function property setter callback for a value-type property. 53 | // 54 | //-------------------------------------------------------------------------------- 55 | template 56 | HRESULT CALLBACK ValueSetter( 57 | _In_ IUnknown *effect, 58 | _In_reads_(dataSize) const BYTE *data, 59 | UINT32 dataSize 60 | ) 61 | { 62 | // Cast through I to resolve multiple-inheritance ambiguities. 63 | return DeducingValueSetter(P, static_cast(effect), data, dataSize); 64 | } 65 | 66 | //+----------------------------------------------------------------------------- 67 | // 68 | // Function: 69 | // DeducingValueGetter 70 | // 71 | // Synopsis: 72 | // Deduces the class and arguments and then calls a member-function property 73 | // getter callback for a value-type property. 74 | // 75 | // This should not be called directly. 76 | // 77 | //-------------------------------------------------------------------------------- 78 | template 79 | HRESULT DeducingValueGetter( 80 | _In_ P (C::*callback)() const, 81 | _In_ const I *effect, 82 | _Out_writes_opt_(dataSize) BYTE *data, 83 | UINT32 dataSize, 84 | _Out_opt_ UINT32 *actualSize 85 | ) 86 | { 87 | if (actualSize) 88 | { 89 | *actualSize = sizeof(P); 90 | } 91 | 92 | if (dataSize > 0 && data) 93 | { 94 | if (dataSize < sizeof(P)) 95 | { 96 | return E_NOT_SUFFICIENT_BUFFER; 97 | } 98 | 99 | *reinterpret_cast

(data) = (static_cast(effect)->*callback)(); 100 | } 101 | 102 | return S_OK; 103 | } 104 | 105 | //+----------------------------------------------------------------------------- 106 | // 107 | // Function: 108 | // ValueGetter 109 | // 110 | // Synopsis: 111 | // Calls a member-function property setter callback for a value-type property. 112 | // 113 | //-------------------------------------------------------------------------------- 114 | template 115 | HRESULT CALLBACK ValueGetter( 116 | _In_ const IUnknown *effect, 117 | _Out_writes_opt_(dataSize) BYTE *data, 118 | UINT32 dataSize, 119 | _Out_opt_ UINT32 *actualSize 120 | ) 121 | { 122 | // Cast through I to resolve multiple-inheritance ambiguities. 123 | return DeducingValueGetter(P, static_cast(effect), data, dataSize, actualSize); 124 | } 125 | 126 | //+----------------------------------------------------------------------------- 127 | // 128 | // Function: 129 | // DeducingBlobSetter 130 | // 131 | // Synopsis: 132 | // Deduces the class and arguments and then calls a member-function property 133 | // setter callback for a blob-type property. 134 | // 135 | // This should not be called directly. 136 | // 137 | //-------------------------------------------------------------------------------- 138 | template 139 | HRESULT DeducingBlobSetter( 140 | _In_ HRESULT (C::*callback)(const BYTE *, UINT32), 141 | _In_ I *effect, 142 | _In_reads_(dataSize) const BYTE *data, 143 | UINT32 dataSize 144 | ) 145 | { 146 | return (static_cast(effect)->*callback)(data, dataSize); 147 | } 148 | 149 | //+----------------------------------------------------------------------------- 150 | // 151 | // Function: 152 | // BlobSetter 153 | // 154 | // Synopsis: 155 | // Calls a member-function property setter callback for a blob-type property. 156 | // 157 | //-------------------------------------------------------------------------------- 158 | template 159 | HRESULT CALLBACK BlobSetter( 160 | _In_ IUnknown *effect, 161 | _In_reads_(dataSize) const BYTE *data, 162 | UINT32 dataSize 163 | ) 164 | { 165 | // Cast through I to resolve multiple-inheritance ambiguities. 166 | return DeducingBlobSetter(P, static_cast(effect), data, dataSize); 167 | } 168 | 169 | //+----------------------------------------------------------------------------- 170 | // 171 | // Function: 172 | // DeducingBlobGetter 173 | // 174 | // Synopsis: 175 | // Deduces the class and arguments and then calls a member-function property 176 | // getter callback for a blob-type property. 177 | // 178 | // This should not be called directly. 179 | // 180 | //-------------------------------------------------------------------------------- 181 | template 182 | HRESULT DeducingBlobGetter( 183 | _In_ HRESULT (C::*callback)(BYTE *, UINT32, UINT32*) const, 184 | _In_ const I *effect, 185 | _Out_writes_opt_(dataSize) BYTE *data, 186 | UINT32 dataSize, 187 | _Out_opt_ UINT32 *actualSize 188 | ) 189 | { 190 | return (static_cast(effect)->*callback)(data, dataSize, actualSize); 191 | } 192 | 193 | //+----------------------------------------------------------------------------- 194 | // 195 | // Function: 196 | // BlobGetter 197 | // 198 | // Synopsis: 199 | // Calls a member-function property getter callback for a blob-type property. 200 | // 201 | //-------------------------------------------------------------------------------- 202 | template 203 | HRESULT CALLBACK BlobGetter( 204 | _In_ const IUnknown *effect, 205 | _Out_writes_opt_(dataSize) BYTE *data, 206 | UINT32 dataSize, 207 | _Out_opt_ UINT32 *actualSize 208 | ) 209 | { 210 | // Cast through I to resolve multiple-inheritance ambiguities. 211 | return DeducingBlobGetter(P, static_cast(effect), data, dataSize, actualSize); 212 | } 213 | 214 | //+----------------------------------------------------------------------------- 215 | // 216 | // Function: 217 | // DeducingStringSetter 218 | // 219 | // Synopsis: 220 | // Deduces the class and arguments and then calls a member-function property 221 | // setter callback for a string-type property. 222 | // 223 | // This should not be called directly. 224 | // 225 | //-------------------------------------------------------------------------------- 226 | template 227 | HRESULT DeducingStringSetter( 228 | _In_ HRESULT (C::*callback)(PCWSTR string), 229 | _In_ I *effect, 230 | _In_reads_(dataSize) const BYTE *data, 231 | UINT32 dataSize 232 | ) 233 | { 234 | dataSize; 235 | 236 | return (static_cast(effect)->*callback)(reinterpret_cast(data)); 237 | } 238 | 239 | //+----------------------------------------------------------------------------- 240 | // 241 | // Function: 242 | // StringSetter 243 | // 244 | // Synopsis: 245 | // Calls a member-function property setter callback for a string-type property. 246 | // 247 | //-------------------------------------------------------------------------------- 248 | template 249 | HRESULT CALLBACK StringSetter( 250 | _In_ IUnknown *effect, 251 | _In_reads_(dataSize) const BYTE *data, 252 | UINT32 dataSize 253 | ) 254 | { 255 | // Cast through I to resolve multiple-inheritance ambiguities. 256 | return DeducingStringSetter(P, static_cast(effect), data, dataSize); 257 | } 258 | 259 | //+----------------------------------------------------------------------------- 260 | // 261 | // Function: 262 | // DeducingStringGetter 263 | // 264 | // Synopsis: 265 | // Deduces the class and arguments and then calls a member-function property 266 | // getter callback for a string-type property. 267 | // 268 | // This should not be called directly. 269 | // 270 | //-------------------------------------------------------------------------------- 271 | template 272 | HRESULT DeducingStringGetter( 273 | _In_ HRESULT (C::*callback)(PWSTR, UINT32, UINT32*) const, 274 | _In_ const I *effect, 275 | _Out_writes_opt_(dataSize) BYTE *data, 276 | UINT32 dataSize, 277 | _Out_opt_ UINT32 *actualSize 278 | ) 279 | { 280 | UINT32 cchString = 0; 281 | 282 | HRESULT hr = (static_cast(effect)->*callback)(reinterpret_cast(data), dataSize / sizeof(WCHAR), &cchString); 283 | 284 | if ((SUCCEEDED(hr) || hr == E_NOT_SUFFICIENT_BUFFER) && actualSize) 285 | { 286 | *actualSize = cchString * sizeof(WCHAR); 287 | } 288 | 289 | return hr; 290 | } 291 | 292 | //+----------------------------------------------------------------------------- 293 | // 294 | // Function: 295 | // StringGetter 296 | // 297 | // Synopsis: 298 | // Calls a member-function property getter callback for a string-type property. 299 | // 300 | //-------------------------------------------------------------------------------- 301 | template 302 | HRESULT CALLBACK StringGetter( 303 | _In_ const IUnknown *effect, 304 | _Out_writes_opt_(dataSize) BYTE *data, 305 | UINT32 dataSize, 306 | _Out_opt_ UINT32 *actualSize 307 | ) 308 | { 309 | // Cast through I to resolve multiple-inheritance ambiguities. 310 | return DeducingStringGetter(P, static_cast(effect), data, dataSize, actualSize); 311 | } 312 | 313 | // 314 | // Simpler versions of the helpers can be declared if decltype is available: 315 | // 316 | #if _MSC_VER >= 1600 317 | #define D2D1_SIMPLE_BINDING_MACROS 318 | #endif 319 | 320 | #ifdef D2D1_SIMPLE_BINDING_MACROS 321 | 322 | // 323 | // Helper to work around decltype issues: 324 | // 325 | template 326 | T GetType(T t) { return t; }; 327 | 328 | // 329 | // Helper macros for declaring a D2D1_PROPERTY_BINDING for value, blob, or string callbacks. 330 | // 331 | #define D2D1_VALUE_TYPE_BINDING(NAME, SETTER, GETTER) \ 332 | { NAME, &ValueSetter, &ValueGetter } 333 | 334 | #define D2D1_BLOB_TYPE_BINDING(NAME, SETTER, GETTER) \ 335 | { NAME, &BlobSetter, &BlobGetter } 336 | 337 | #define D2D1_STRING_TYPE_BINDING(NAME, SETTER, GETTER) \ 338 | { NAME, &StringSetter, &StringGetter } 339 | 340 | // 341 | // Read-only variants: 342 | // 343 | #define D2D1_READONLY_VALUE_TYPE_BINDING(NAME, GETTER) \ 344 | { NAME, NULL, &ValueGetter } 345 | 346 | #define D2D1_READONLY_BLOB_TYPE_BINDING(NAME, GETTER) \ 347 | { NAME, NULL, &BlobGetter } 348 | 349 | #define D2D1_READONLY_STRING_TYPE_BINDING(NAME, GETTER) \ 350 | { NAME, NULL, &StringGetter } 351 | 352 | #else // #ifdef D2D1_SIMPLE_BINDING_MACROS 353 | 354 | // 355 | // Helper macros for declaring a D2D1_PROPERTY_BINDING for value, blob, or string callbacks. 356 | // 357 | #define D2D1_VALUE_TYPE_BINDING(NAME, TYPE, CLASS, SETTER, GETTER) \ 358 | { \ 359 | NAME, \ 360 | &ValueSetter, \ 361 | &ValueGetter \ 362 | } 363 | 364 | #define D2D1_BLOB_TYPE_BINDING(NAME, CLASS, SETTER, GETTER) \ 365 | { \ 366 | NAME, \ 367 | &BlobSetter, \ 368 | &BlobGetter \ 369 | } 370 | 371 | #define D2D1_STRING_TYPE_BINDING(NAME, CLASS, SETTER, GETTER) \ 372 | { \ 373 | NAME, \ 374 | &StringSetter, \ 375 | &StringGetter \ 376 | } 377 | 378 | // 379 | // Read-only variants: 380 | // 381 | #define D2D1_READONLY_VALUE_TYPE_BINDING(NAME, TYPE, CLASS, GETTER) \ 382 | { \ 383 | NAME, \ 384 | NULL, \ 385 | &ValueGetter \ 386 | } 387 | 388 | #define D2D1_READONLY_BLOB_TYPE_BINDING(NAME, CLASS, GETTER) \ 389 | { \ 390 | NAME, \ 391 | NULL, \ 392 | &BlobGetter \ 393 | } 394 | 395 | #define D2D1_READONLY_STRING_TYPE_BINDING(NAME, CLASS, GETTER) \ 396 | { \ 397 | NAME, \ 398 | NULL, \ 399 | &StringGetter \ 400 | } 401 | 402 | #endif // #ifdef D2D1_SIMPLE_BINDING_MACROS 403 | 404 | 405 | #endif // #ifndef _D2D1_AUTHOR_H_ 406 | -------------------------------------------------------------------------------- /Include/d2d1effects_1.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // This file is automatically generated. Please do not edit it directly. 5 | // 6 | // File name: D2D1Effects_1.h 7 | //--------------------------------------------------------------------------- 8 | #ifdef _MSC_VER 9 | #pragma once 10 | #endif // #ifdef _MSC_VER 11 | 12 | #ifndef _D2D1_EFFECTS_1_ 13 | #define _D2D1_EFFECTS_1_ 14 | 15 | #ifndef _D2D1_EFFECTS_ 16 | #include 17 | #endif // #ifndef _D2D1_EFFECTS_ 18 | 19 | 20 | 21 | 22 | // Built in effect CLSIDs 23 | DEFINE_GUID(CLSID_D2D1YCbCr, 0x99503cc1, 0x66c7, 0x45c9, 0xa8, 0x75, 0x8a, 0xd8, 0xa7, 0x91, 0x44, 0x01); 24 | 25 | ///

26 | /// The enumeration of the YCbCr effect's top level properties. 27 | /// Effect description: An effect that takes a Y plane as input 0 and a CbCr plane 28 | /// as input 1 and outputs RGBA. The CbCr plane can be chroma subsampled. Useful 29 | /// for JPEG color conversion. 30 | /// 31 | typedef enum D2D1_YCBCR_PROP 32 | { 33 | 34 | /// 35 | /// Property Name: "ChromaSubsampling" 36 | /// Property Type: D2D1_YCBCR_CHROMA_SUBSAMPLING 37 | /// 38 | D2D1_YCBCR_PROP_CHROMA_SUBSAMPLING = 0, 39 | 40 | /// 41 | /// Property Name: "TransformMatrix" 42 | /// Property Type: D2D1_MATRIX_3X2_F 43 | /// 44 | D2D1_YCBCR_PROP_TRANSFORM_MATRIX = 1, 45 | 46 | /// 47 | /// Property Name: "InterpolationMode" 48 | /// Property Type: D2D1_YCBCR_INTERPOLATION_MODE 49 | /// 50 | D2D1_YCBCR_PROP_INTERPOLATION_MODE = 2, 51 | D2D1_YCBCR_PROP_FORCE_DWORD = 0xffffffff 52 | 53 | } D2D1_YCBCR_PROP; 54 | 55 | typedef enum D2D1_YCBCR_CHROMA_SUBSAMPLING 56 | { 57 | D2D1_YCBCR_CHROMA_SUBSAMPLING_AUTO = 0, 58 | D2D1_YCBCR_CHROMA_SUBSAMPLING_420 = 1, 59 | D2D1_YCBCR_CHROMA_SUBSAMPLING_422 = 2, 60 | D2D1_YCBCR_CHROMA_SUBSAMPLING_444 = 3, 61 | D2D1_YCBCR_CHROMA_SUBSAMPLING_440 = 4, 62 | D2D1_YCBCR_CHROMA_SUBSAMPLING_FORCE_DWORD = 0xffffffff 63 | 64 | } D2D1_YCBCR_CHROMA_SUBSAMPLING; 65 | 66 | typedef enum D2D1_YCBCR_INTERPOLATION_MODE 67 | { 68 | D2D1_YCBCR_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, 69 | D2D1_YCBCR_INTERPOLATION_MODE_LINEAR = 1, 70 | D2D1_YCBCR_INTERPOLATION_MODE_CUBIC = 2, 71 | D2D1_YCBCR_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = 3, 72 | D2D1_YCBCR_INTERPOLATION_MODE_ANISOTROPIC = 4, 73 | D2D1_YCBCR_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = 5, 74 | D2D1_YCBCR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff 75 | 76 | } D2D1_YCBCR_INTERPOLATION_MODE; 77 | 78 | 79 | 80 | #endif // #ifndef _D2D1_EFFECTS_1_ 81 | -------------------------------------------------------------------------------- /Include/d2dbasetypes.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // This file is automatically generated. Please do not edit it directly. 5 | // 6 | // File name: D2DBaseTypes.h 7 | //--------------------------------------------------------------------------- 8 | #ifdef _MSC_VER 9 | #pragma once 10 | #endif // #ifdef _MSC_VER 11 | 12 | #ifndef _D2DBASETYPES_INCLUDED 13 | #define _D2DBASETYPES_INCLUDED 14 | 15 | #ifndef COM_NO_WINDOWS_H 16 | #include 17 | #endif // #ifndef COM_NO_WINDOWS_H 18 | #ifndef __dxgitype_h__ 19 | #include 20 | #endif // #ifndef __dxgitype_h__ 21 | #ifndef DCOMMON_H_INCLUDED 22 | #include 23 | #endif // #ifndef DCOMMON_H_INCLUDED 24 | typedef D3DCOLORVALUE D2D_COLOR_F; 25 | #endif // #ifndef _D2DBASETYPES_INCLUDED 26 | -------------------------------------------------------------------------------- /Include/d2derr.h: -------------------------------------------------------------------------------- 1 | /*=========================================================================*\ 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | \*=========================================================================*/ 6 | 7 | #pragma once 8 | 9 | 10 | 11 | /*=========================================================================*\ 12 | D2D Status Codes 13 | \*=========================================================================*/ 14 | 15 | #define FACILITY_D2D 0x899 16 | 17 | #define MAKE_D2DHR( sev, code )\ 18 | MAKE_HRESULT( sev, FACILITY_D2D, (code) ) 19 | 20 | #define MAKE_D2DHR_ERR( code )\ 21 | MAKE_D2DHR( 1, code ) 22 | 23 | 24 | //+---------------------------------------------------------------------------- 25 | // 26 | // D2D error codes 27 | // 28 | //------------------------------------------------------------------------------ 29 | 30 | // 31 | // Error codes shared with WINCODECS 32 | // 33 | 34 | // 35 | // The pixel format is not supported. 36 | // 37 | #define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 38 | 39 | // 40 | // Error codes that were already returned in prior versions and were part of the 41 | // MIL facility. 42 | 43 | // 44 | // Error codes mapped from WIN32 where there isn't already another HRESULT based 45 | // define 46 | // 47 | 48 | // 49 | // The supplied buffer was too small to accommodate the data. 50 | // 51 | #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) 52 | 53 | 54 | // 55 | // The file specified was not found. 56 | // 57 | #define D2DERR_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) 58 | 59 | // 60 | // D2D specific codes now live in winerror.h 61 | // 62 | 63 | 64 | -------------------------------------------------------------------------------- /Include/d3d10_1shader.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // File: D3D10_1Shader.h 6 | // Content: D3D10.1 Shader Types and APIs 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef __D3D10_1SHADER_H__ 11 | #define __D3D10_1SHADER_H__ 12 | 13 | #include "d3d10shader.h" 14 | 15 | 16 | 17 | 18 | //---------------------------------------------------------------------------- 19 | // Shader debugging structures 20 | //---------------------------------------------------------------------------- 21 | 22 | typedef enum _D3D10_SHADER_DEBUG_REGTYPE 23 | { 24 | D3D10_SHADER_DEBUG_REG_INPUT, 25 | D3D10_SHADER_DEBUG_REG_OUTPUT, 26 | D3D10_SHADER_DEBUG_REG_CBUFFER, 27 | D3D10_SHADER_DEBUG_REG_TBUFFER, 28 | D3D10_SHADER_DEBUG_REG_TEMP, 29 | D3D10_SHADER_DEBUG_REG_TEMPARRAY, 30 | D3D10_SHADER_DEBUG_REG_TEXTURE, 31 | D3D10_SHADER_DEBUG_REG_SAMPLER, 32 | D3D10_SHADER_DEBUG_REG_IMMEDIATECBUFFER, 33 | D3D10_SHADER_DEBUG_REG_LITERAL, 34 | D3D10_SHADER_DEBUG_REG_UNUSED, 35 | D3D11_SHADER_DEBUG_REG_INTERFACE_POINTERS, 36 | D3D11_SHADER_DEBUG_REG_UAV, 37 | D3D10_SHADER_DEBUG_REG_FORCE_DWORD = 0x7fffffff, 38 | } D3D10_SHADER_DEBUG_REGTYPE; 39 | 40 | typedef enum _D3D10_SHADER_DEBUG_SCOPETYPE 41 | { 42 | D3D10_SHADER_DEBUG_SCOPE_GLOBAL, 43 | D3D10_SHADER_DEBUG_SCOPE_BLOCK, 44 | D3D10_SHADER_DEBUG_SCOPE_FORLOOP, 45 | D3D10_SHADER_DEBUG_SCOPE_STRUCT, 46 | D3D10_SHADER_DEBUG_SCOPE_FUNC_PARAMS, 47 | D3D10_SHADER_DEBUG_SCOPE_STATEBLOCK, 48 | D3D10_SHADER_DEBUG_SCOPE_NAMESPACE, 49 | D3D10_SHADER_DEBUG_SCOPE_ANNOTATION, 50 | D3D10_SHADER_DEBUG_SCOPE_FORCE_DWORD = 0x7fffffff, 51 | } D3D10_SHADER_DEBUG_SCOPETYPE; 52 | 53 | typedef enum _D3D10_SHADER_DEBUG_VARTYPE 54 | { 55 | D3D10_SHADER_DEBUG_VAR_VARIABLE, 56 | D3D10_SHADER_DEBUG_VAR_FUNCTION, 57 | D3D10_SHADER_DEBUG_VAR_FORCE_DWORD = 0x7fffffff, 58 | } D3D10_SHADER_DEBUG_VARTYPE; 59 | 60 | ///////////////////////////////////////////////////////////////////// 61 | // These are the serialized structures that get written to the file 62 | ///////////////////////////////////////////////////////////////////// 63 | 64 | typedef struct _D3D10_SHADER_DEBUG_TOKEN_INFO 65 | { 66 | UINT File; // offset into file list 67 | UINT Line; // line # 68 | UINT Column; // column # 69 | 70 | UINT TokenLength; 71 | UINT TokenId; // offset to LPCSTR of length TokenLength in string datastore 72 | } D3D10_SHADER_DEBUG_TOKEN_INFO; 73 | 74 | // Variable list 75 | typedef struct _D3D10_SHADER_DEBUG_VAR_INFO 76 | { 77 | // Index into token list for declaring identifier 78 | UINT TokenId; 79 | D3D10_SHADER_VARIABLE_TYPE Type; 80 | // register and component for this variable, only valid/necessary for arrays 81 | UINT Register; 82 | UINT Component; 83 | // gives the original variable that declared this variable 84 | UINT ScopeVar; 85 | // this variable's offset in its ScopeVar 86 | UINT ScopeVarOffset; 87 | } D3D10_SHADER_DEBUG_VAR_INFO; 88 | 89 | typedef struct _D3D10_SHADER_DEBUG_INPUT_INFO 90 | { 91 | // index into array of variables of variable to initialize 92 | UINT Var; 93 | // input, cbuffer, tbuffer 94 | D3D10_SHADER_DEBUG_REGTYPE InitialRegisterSet; 95 | // set to cbuffer or tbuffer slot, geometry shader input primitive #, 96 | // identifying register for indexable temp, or -1 97 | UINT InitialBank; 98 | // -1 if temp, otherwise gives register in register set 99 | UINT InitialRegister; 100 | // -1 if temp, otherwise gives component 101 | UINT InitialComponent; 102 | // initial value if literal 103 | UINT InitialValue; 104 | } D3D10_SHADER_DEBUG_INPUT_INFO; 105 | 106 | typedef struct _D3D10_SHADER_DEBUG_SCOPEVAR_INFO 107 | { 108 | // Index into variable token 109 | UINT TokenId; 110 | 111 | D3D10_SHADER_DEBUG_VARTYPE VarType; // variable or function (different namespaces) 112 | D3D10_SHADER_VARIABLE_CLASS Class; 113 | UINT Rows; // number of rows (matrices) 114 | UINT Columns; // number of columns (vectors and matrices) 115 | 116 | // In an array of structures, one struct member scope is provided, and 117 | // you'll have to add the array stride times the index to the variable 118 | // index you find, then find that variable in this structure's list of 119 | // variables. 120 | 121 | // gives a scope to look up struct members. -1 if not a struct 122 | UINT StructMemberScope; 123 | 124 | // number of array indices 125 | UINT uArrayIndices; // a[3][2][1] has 3 indices 126 | // maximum array index for each index 127 | // offset to UINT[uArrayIndices] in UINT datastore 128 | UINT ArrayElements; // a[3][2][1] has {3, 2, 1} 129 | // how many variables each array index moves 130 | // offset to UINT[uArrayIndices] in UINT datastore 131 | UINT ArrayStrides; // a[3][2][1] has {2, 1, 1} 132 | 133 | UINT uVariables; 134 | // index of the first variable, later variables are offsets from this one 135 | UINT uFirstVariable; 136 | } D3D10_SHADER_DEBUG_SCOPEVAR_INFO; 137 | 138 | // scope data, this maps variable names to debug variables (useful for the watch window) 139 | typedef struct _D3D10_SHADER_DEBUG_SCOPE_INFO 140 | { 141 | D3D10_SHADER_DEBUG_SCOPETYPE ScopeType; 142 | UINT Name; // offset to name of scope in strings list 143 | UINT uNameLen; // length of name string 144 | UINT uVariables; 145 | UINT VariableData; // Offset to UINT[uVariables] indexing the Scope Variable list 146 | } D3D10_SHADER_DEBUG_SCOPE_INFO; 147 | 148 | // instruction outputs 149 | typedef struct _D3D10_SHADER_DEBUG_OUTPUTVAR 150 | { 151 | // index variable being written to, if -1 it's not going to a variable 152 | UINT Var; 153 | // range data that the compiler expects to be true 154 | UINT uValueMin, uValueMax; 155 | INT iValueMin, iValueMax; 156 | FLOAT fValueMin, fValueMax; 157 | 158 | BOOL bNaNPossible, bInfPossible; 159 | } D3D10_SHADER_DEBUG_OUTPUTVAR; 160 | 161 | typedef struct _D3D10_SHADER_DEBUG_OUTPUTREG_INFO 162 | { 163 | // Only temp, indexable temp, and output are valid here 164 | D3D10_SHADER_DEBUG_REGTYPE OutputRegisterSet; 165 | // -1 means no output 166 | UINT OutputReg; 167 | // if a temp array, identifier for which one 168 | UINT TempArrayReg; 169 | // -1 means masked out 170 | UINT OutputComponents[4]; 171 | D3D10_SHADER_DEBUG_OUTPUTVAR OutputVars[4]; 172 | // when indexing the output, get the value of this register, then add 173 | // that to uOutputReg. If uIndexReg is -1, then there is no index. 174 | // find the variable whose register is the sum (by looking in the ScopeVar) 175 | // and component matches, then set it. This should only happen for indexable 176 | // temps and outputs. 177 | UINT IndexReg; 178 | UINT IndexComp; 179 | } D3D10_SHADER_DEBUG_OUTPUTREG_INFO; 180 | 181 | // per instruction data 182 | typedef struct _D3D10_SHADER_DEBUG_INST_INFO 183 | { 184 | UINT Id; // Which instruction this is in the bytecode 185 | UINT Opcode; // instruction type 186 | 187 | // 0, 1, or 2 188 | UINT uOutputs; 189 | 190 | // up to two outputs per instruction 191 | D3D10_SHADER_DEBUG_OUTPUTREG_INFO pOutputs[2]; 192 | 193 | // index into the list of tokens for this instruction's token 194 | UINT TokenId; 195 | 196 | // how many function calls deep this instruction is 197 | UINT NestingLevel; 198 | 199 | // list of scopes from outer-most to inner-most 200 | // Number of scopes 201 | UINT Scopes; 202 | UINT ScopeInfo; // Offset to UINT[uScopes] specifying indices of the ScopeInfo Array 203 | 204 | // list of variables accessed by this instruction 205 | // Number of variables 206 | UINT AccessedVars; 207 | UINT AccessedVarsInfo; // Offset to UINT[AccessedVars] specifying indices of the ScopeVariableInfo Array 208 | } D3D10_SHADER_DEBUG_INST_INFO; 209 | 210 | typedef struct _D3D10_SHADER_DEBUG_FILE_INFO 211 | { 212 | UINT FileName; // Offset to LPCSTR for file name 213 | UINT FileNameLen; // Length of file name 214 | UINT FileData; // Offset to LPCSTR of length FileLen 215 | UINT FileLen; // Length of file 216 | } D3D10_SHADER_DEBUG_FILE_INFO; 217 | 218 | typedef struct _D3D10_SHADER_DEBUG_INFO 219 | { 220 | UINT Size; // sizeof(D3D10_SHADER_DEBUG_INFO) 221 | UINT Creator; // Offset to LPCSTR for compiler version 222 | UINT EntrypointName; // Offset to LPCSTR for Entry point name 223 | UINT ShaderTarget; // Offset to LPCSTR for shader target 224 | UINT CompileFlags; // flags used to compile 225 | UINT Files; // number of included files 226 | UINT FileInfo; // Offset to D3D10_SHADER_DEBUG_FILE_INFO[Files] 227 | UINT Instructions; // number of instructions 228 | UINT InstructionInfo; // Offset to D3D10_SHADER_DEBUG_INST_INFO[Instructions] 229 | UINT Variables; // number of variables 230 | UINT VariableInfo; // Offset to D3D10_SHADER_DEBUG_VAR_INFO[Variables] 231 | UINT InputVariables; // number of variables to initialize before running 232 | UINT InputVariableInfo; // Offset to D3D10_SHADER_DEBUG_INPUT_INFO[InputVariables] 233 | UINT Tokens; // number of tokens to initialize 234 | UINT TokenInfo; // Offset to D3D10_SHADER_DEBUG_TOKEN_INFO[Tokens] 235 | UINT Scopes; // number of scopes 236 | UINT ScopeInfo; // Offset to D3D10_SHADER_DEBUG_SCOPE_INFO[Scopes] 237 | UINT ScopeVariables; // number of variables declared 238 | UINT ScopeVariableInfo; // Offset to D3D10_SHADER_DEBUG_SCOPEVAR_INFO[Scopes] 239 | UINT UintOffset; // Offset to the UINT datastore, all UINT offsets are from this offset 240 | UINT StringOffset; // Offset to the string datastore, all string offsets are from this offset 241 | } D3D10_SHADER_DEBUG_INFO; 242 | 243 | //---------------------------------------------------------------------------- 244 | // ID3D10ShaderReflection1: 245 | //---------------------------------------------------------------------------- 246 | 247 | // 248 | // Interface definitions 249 | // 250 | 251 | 252 | typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1; 253 | typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1; 254 | 255 | // {C3457783-A846-47CE-9520-CEA6F66E7447} 256 | DEFINE_GUID(IID_ID3D10ShaderReflection1, 257 | 0xc3457783, 0xa846, 0x47ce, 0x95, 0x20, 0xce, 0xa6, 0xf6, 0x6e, 0x74, 0x47); 258 | 259 | #undef INTERFACE 260 | #define INTERFACE ID3D10ShaderReflection1 261 | 262 | DECLARE_INTERFACE_(ID3D10ShaderReflection1, IUnknown) 263 | { 264 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 265 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 266 | STDMETHOD_(ULONG, Release)(THIS) PURE; 267 | 268 | STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_SHADER_DESC *pDesc) PURE; 269 | 270 | STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE; 271 | STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE; 272 | 273 | STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; 274 | 275 | STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; 276 | STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; 277 | 278 | STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE; 279 | 280 | STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR Name, _Out_ D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; 281 | 282 | STDMETHOD(GetMovInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; 283 | STDMETHOD(GetMovcInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; 284 | STDMETHOD(GetConversionInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; 285 | STDMETHOD(GetBitwiseInstructionCount)(THIS_ _Out_ UINT* pCount) PURE; 286 | 287 | STDMETHOD(GetGSInputPrimitive)(THIS_ _Out_ D3D10_PRIMITIVE* pPrim) PURE; 288 | STDMETHOD(IsLevel9Shader)(THIS_ _Out_ BOOL* pbLevel9Shader) PURE; 289 | STDMETHOD(IsSampleFrequencyShader)(THIS_ _Out_ BOOL* pbSampleFrequency) PURE; 290 | }; 291 | 292 | ////////////////////////////////////////////////////////////////////////////// 293 | // APIs ////////////////////////////////////////////////////////////////////// 294 | ////////////////////////////////////////////////////////////////////////////// 295 | 296 | #ifdef __cplusplus 297 | extern "C" { 298 | #endif //__cplusplus 299 | 300 | #ifdef __cplusplus 301 | } 302 | #endif //__cplusplus 303 | 304 | #endif //__D3D10_1SHADER_H__ 305 | 306 | -------------------------------------------------------------------------------- /Include/d3d10misc.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // File: D3D10Misc.h 6 | // Content: D3D10 Device Creation APIs 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef __D3D10MISC_H__ 11 | #define __D3D10MISC_H__ 12 | 13 | #include "d3d10.h" 14 | 15 | // ID3D10Blob has been made version-neutral and moved to d3dcommon.h. 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif //__cplusplus 20 | 21 | 22 | 23 | /////////////////////////////////////////////////////////////////////////// 24 | // D3D10_DRIVER_TYPE 25 | // ---------------- 26 | // 27 | // This identifier is used to determine the implementation of Direct3D10 28 | // to be used. 29 | // 30 | // Pass one of these values to D3D10CreateDevice 31 | // 32 | /////////////////////////////////////////////////////////////////////////// 33 | typedef enum D3D10_DRIVER_TYPE 34 | { 35 | D3D10_DRIVER_TYPE_HARDWARE = 0, 36 | D3D10_DRIVER_TYPE_REFERENCE = 1, 37 | D3D10_DRIVER_TYPE_NULL = 2, 38 | D3D10_DRIVER_TYPE_SOFTWARE = 3, 39 | D3D10_DRIVER_TYPE_WARP = 5, 40 | } D3D10_DRIVER_TYPE; 41 | 42 | DEFINE_GUID(GUID_DeviceType, 43 | 0xd722fb4d, 0x7a68, 0x437a, 0xb2, 0x0c, 0x58, 0x04, 0xee, 0x24, 0x94, 0xa6); 44 | 45 | /////////////////////////////////////////////////////////////////////////// 46 | // D3D10CreateDevice 47 | // ------------------ 48 | // 49 | // pAdapter 50 | // If NULL, D3D10CreateDevice will choose the primary adapter and 51 | // create a new instance from a temporarily created IDXGIFactory. 52 | // If non-NULL, D3D10CreateDevice will register the appropriate 53 | // device, if necessary (via IDXGIAdapter::RegisterDrver), before 54 | // creating the device. 55 | // DriverType 56 | // Specifies the driver type to be created: hardware, reference or 57 | // null. 58 | // Software 59 | // HMODULE of a DLL implementing a software rasterizer. Must be NULL for 60 | // non-Software driver types. 61 | // Flags 62 | // Any of those documented for D3D10CreateDevice. 63 | // SDKVersion 64 | // SDK version. Use the D3D10_SDK_VERSION macro. 65 | // ppDevice 66 | // Pointer to returned interface. 67 | // 68 | // Return Values 69 | // Any of those documented for 70 | // CreateDXGIFactory 71 | // IDXGIFactory::EnumAdapters 72 | // IDXGIAdapter::RegisterDriver 73 | // D3D10CreateDevice 74 | // 75 | /////////////////////////////////////////////////////////////////////////// 76 | HRESULT WINAPI D3D10CreateDevice( 77 | _In_opt_ IDXGIAdapter *pAdapter, 78 | D3D10_DRIVER_TYPE DriverType, 79 | HMODULE Software, 80 | UINT Flags, 81 | UINT SDKVersion, 82 | _Out_opt_ ID3D10Device **ppDevice); 83 | 84 | /////////////////////////////////////////////////////////////////////////// 85 | // D3D10CreateDeviceAndSwapChain 86 | // ------------------------------ 87 | // 88 | // ppAdapter 89 | // If NULL, D3D10CreateDevice will choose the primary adapter and 90 | // create a new instance from a temporarily created IDXGIFactory. 91 | // If non-NULL, D3D10CreateDevice will register the appropriate 92 | // device, if necessary (via IDXGIAdapter::RegisterDrver), before 93 | // creating the device. 94 | // DriverType 95 | // Specifies the driver type to be created: hardware, reference or 96 | // null. 97 | // Software 98 | // HMODULE of a DLL implementing a software rasterizer. Must be NULL for 99 | // non-Software driver types. 100 | // Flags 101 | // Any of those documented for D3D10CreateDevice. 102 | // SDKVersion 103 | // SDK version. Use the D3D10_SDK_VERSION macro. 104 | // pSwapChainDesc 105 | // Swap chain description, may be NULL. 106 | // ppSwapChain 107 | // Pointer to returned interface. May be NULL. 108 | // ppDevice 109 | // Pointer to returned interface. 110 | // 111 | // Return Values 112 | // Any of those documented for 113 | // CreateDXGIFactory 114 | // IDXGIFactory::EnumAdapters 115 | // IDXGIAdapter::RegisterDriver 116 | // D3D10CreateDevice 117 | // IDXGIFactory::CreateSwapChain 118 | // 119 | /////////////////////////////////////////////////////////////////////////// 120 | HRESULT WINAPI D3D10CreateDeviceAndSwapChain( 121 | _In_opt_ IDXGIAdapter *pAdapter, 122 | D3D10_DRIVER_TYPE DriverType, 123 | HMODULE Software, 124 | UINT Flags, 125 | UINT SDKVersion, 126 | _In_opt_ DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, 127 | _Out_opt_ IDXGISwapChain **ppSwapChain, 128 | _Out_opt_ ID3D10Device **ppDevice); 129 | 130 | 131 | /////////////////////////////////////////////////////////////////////////// 132 | // D3D10CreateBlob: 133 | // ----------------- 134 | // Creates a Buffer of n Bytes 135 | ////////////////////////////////////////////////////////////////////////// 136 | 137 | HRESULT WINAPI D3D10CreateBlob(SIZE_T NumBytes, _Out_ LPD3D10BLOB *ppBuffer); 138 | 139 | 140 | #ifdef __cplusplus 141 | } 142 | #endif //__cplusplus 143 | 144 | #endif //__D3D10EFFECT_H__ 145 | 146 | 147 | -------------------------------------------------------------------------------- /Include/d3dvec.inl: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************** 3 | * * 4 | * D3DVec.inl * 5 | * * 6 | * Float-valued 3D vector class for Direct3D. * 7 | * * 8 | * Copyright (c) Microsoft Corp. All rights reserved. * 9 | * * 10 | ******************************************************************/ 11 | 12 | 13 | 14 | #include 15 | 16 | // ===================================== 17 | // Constructors 18 | // ===================================== 19 | 20 | inline 21 | _D3DVECTOR::_D3DVECTOR(D3DVALUE f) 22 | { 23 | x = y = z = f; 24 | } 25 | 26 | inline 27 | _D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z) 28 | { 29 | x = _x; y = _y; z = _z; 30 | } 31 | 32 | inline 33 | _D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3]) 34 | { 35 | x = f[0]; y = f[1]; z = f[2]; 36 | } 37 | 38 | // ===================================== 39 | // Access grants 40 | // ===================================== 41 | 42 | inline const D3DVALUE& 43 | _D3DVECTOR::operator[](int i) const 44 | { 45 | return (&x)[i]; 46 | } 47 | 48 | inline D3DVALUE& 49 | _D3DVECTOR::operator[](int i) 50 | { 51 | return (&x)[i]; 52 | } 53 | 54 | 55 | // ===================================== 56 | // Assignment operators 57 | // ===================================== 58 | 59 | inline _D3DVECTOR& 60 | _D3DVECTOR::operator += (const _D3DVECTOR& v) 61 | { 62 | x += v.x; y += v.y; z += v.z; 63 | return *this; 64 | } 65 | 66 | inline _D3DVECTOR& 67 | _D3DVECTOR::operator -= (const _D3DVECTOR& v) 68 | { 69 | x -= v.x; y -= v.y; z -= v.z; 70 | return *this; 71 | } 72 | 73 | inline _D3DVECTOR& 74 | _D3DVECTOR::operator *= (const _D3DVECTOR& v) 75 | { 76 | x *= v.x; y *= v.y; z *= v.z; 77 | return *this; 78 | } 79 | 80 | inline _D3DVECTOR& 81 | _D3DVECTOR::operator /= (const _D3DVECTOR& v) 82 | { 83 | x /= v.x; y /= v.y; z /= v.z; 84 | return *this; 85 | } 86 | 87 | inline _D3DVECTOR& 88 | _D3DVECTOR::operator *= (D3DVALUE s) 89 | { 90 | x *= s; y *= s; z *= s; 91 | return *this; 92 | } 93 | 94 | inline _D3DVECTOR& 95 | _D3DVECTOR::operator /= (D3DVALUE s) 96 | { 97 | x /= s; y /= s; z /= s; 98 | return *this; 99 | } 100 | 101 | inline _D3DVECTOR 102 | operator + (const _D3DVECTOR& v) 103 | { 104 | return v; 105 | } 106 | 107 | inline _D3DVECTOR 108 | operator - (const _D3DVECTOR& v) 109 | { 110 | return _D3DVECTOR(-v.x, -v.y, -v.z); 111 | } 112 | 113 | inline _D3DVECTOR 114 | operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 115 | { 116 | return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z); 117 | } 118 | 119 | inline _D3DVECTOR 120 | operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 121 | { 122 | return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z); 123 | } 124 | 125 | inline _D3DVECTOR 126 | operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 127 | { 128 | return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z); 129 | } 130 | 131 | inline _D3DVECTOR 132 | operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 133 | { 134 | return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z); 135 | } 136 | 137 | inline int 138 | operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 139 | { 140 | return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2]; 141 | } 142 | 143 | inline int 144 | operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 145 | { 146 | return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2]; 147 | } 148 | 149 | inline _D3DVECTOR 150 | operator * (const _D3DVECTOR& v, D3DVALUE s) 151 | { 152 | return _D3DVECTOR(s*v.x, s*v.y, s*v.z); 153 | } 154 | 155 | inline _D3DVECTOR 156 | operator * (D3DVALUE s, const _D3DVECTOR& v) 157 | { 158 | return _D3DVECTOR(s*v.x, s*v.y, s*v.z); 159 | } 160 | 161 | inline _D3DVECTOR 162 | operator / (const _D3DVECTOR& v, D3DVALUE s) 163 | { 164 | return _D3DVECTOR(v.x/s, v.y/s, v.z/s); 165 | } 166 | 167 | inline int 168 | operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 169 | { 170 | return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z; 171 | } 172 | 173 | inline D3DVALUE 174 | Magnitude (const _D3DVECTOR& v) 175 | { 176 | return (D3DVALUE) sqrt(SquareMagnitude(v)); 177 | } 178 | 179 | inline D3DVALUE 180 | SquareMagnitude (const _D3DVECTOR& v) 181 | { 182 | return v.x*v.x + v.y*v.y + v.z*v.z; 183 | } 184 | 185 | inline _D3DVECTOR 186 | Normalize (const _D3DVECTOR& v) 187 | { 188 | return v / Magnitude(v); 189 | } 190 | 191 | inline D3DVALUE 192 | Min (const _D3DVECTOR& v) 193 | { 194 | D3DVALUE ret = v.x; 195 | if (v.y < ret) ret = v.y; 196 | if (v.z < ret) ret = v.z; 197 | return ret; 198 | } 199 | 200 | inline D3DVALUE 201 | Max (const _D3DVECTOR& v) 202 | { 203 | D3DVALUE ret = v.x; 204 | if (ret < v.y) ret = v.y; 205 | if (ret < v.z) ret = v.z; 206 | return ret; 207 | } 208 | 209 | inline _D3DVECTOR 210 | Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 211 | { 212 | return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0], 213 | v1[1] < v2[1] ? v1[1] : v2[1], 214 | v1[2] < v2[2] ? v1[2] : v2[2]); 215 | } 216 | 217 | inline _D3DVECTOR 218 | Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 219 | { 220 | return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0], 221 | v1[1] > v2[1] ? v1[1] : v2[1], 222 | v1[2] > v2[2] ? v1[2] : v2[2]); 223 | } 224 | 225 | inline D3DVALUE 226 | DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 227 | { 228 | return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z; 229 | } 230 | 231 | inline _D3DVECTOR 232 | CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2) 233 | { 234 | _D3DVECTOR result; 235 | 236 | result[0] = v1[1] * v2[2] - v1[2] * v2[1]; 237 | result[1] = v1[2] * v2[0] - v1[0] * v2[2]; 238 | result[2] = v1[0] * v2[1] - v1[1] * v2[0]; 239 | 240 | return result; 241 | } 242 | 243 | inline _D3DMATRIX 244 | operator* (const _D3DMATRIX& a, const _D3DMATRIX& b) 245 | { 246 | _D3DMATRIX ret; 247 | for (int i=0; i<4; i++) { 248 | for (int j=0; j<4; j++) { 249 | ret(i, j) = 0.0f; 250 | for (int k=0; k<4; k++) { 251 | ret(i, j) += a(i, k) * b(k, j); 252 | } 253 | } 254 | } 255 | return ret; 256 | } 257 | 258 | -------------------------------------------------------------------------------- /Include/d3dx10.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx10.h 6 | // Content: D3DX10 utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX10_INTERNAL__ 11 | #error Incorrect D3DX10 header used 12 | #endif 13 | 14 | #ifndef __D3DX10_H__ 15 | #define __D3DX10_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | #include 21 | 22 | #define D3DX10_DEFAULT ((UINT) -1) 23 | #define D3DX10_FROM_FILE ((UINT) -3) 24 | #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) 25 | 26 | #ifndef D3DX10INLINE 27 | #ifdef _MSC_VER 28 | #if (_MSC_VER >= 1200) 29 | #define D3DX10INLINE __forceinline 30 | #else 31 | #define D3DX10INLINE __inline 32 | #endif 33 | #else 34 | #ifdef __cplusplus 35 | #define D3DX10INLINE inline 36 | #else 37 | #define D3DX10INLINE 38 | #endif 39 | #endif 40 | #endif 41 | 42 | 43 | 44 | // Includes 45 | #include "d3d10.h" 46 | #include "d3dx10.h" 47 | #include "d3dx10math.h" 48 | #include "d3dx10core.h" 49 | #include "d3dx10tex.h" 50 | #include "d3dx10mesh.h" 51 | #include "d3dx10async.h" 52 | 53 | 54 | // Errors 55 | #define _FACDD 0x876 56 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 57 | 58 | enum _D3DX10_ERR { 59 | D3DX10_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), 60 | D3DX10_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), 61 | D3DX10_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), 62 | D3DX10_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), 63 | D3DX10_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), 64 | D3DX10_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), 65 | D3DX10_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), 66 | D3DX10_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), 67 | D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), 68 | }; 69 | 70 | 71 | #endif //__D3DX10_H__ 72 | 73 | -------------------------------------------------------------------------------- /Include/d3dx10core.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx10core.h 6 | // Content: D3DX10 core types and functions 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx10.h" 11 | 12 | #ifndef __D3DX10CORE_H__ 13 | #define __D3DX10CORE_H__ 14 | 15 | // Current name of the DLL shipped in the same SDK as this header. 16 | 17 | 18 | #define D3DX10_DLL_W L"d3dx10_43.dll" 19 | #define D3DX10_DLL_A "d3dx10_43.dll" 20 | 21 | #ifdef UNICODE 22 | #define D3DX10_DLL D3DX10_DLL_W 23 | #else 24 | #define D3DX10_DLL D3DX10_DLL_A 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif //__cplusplus 30 | 31 | /////////////////////////////////////////////////////////////////////////// 32 | // D3DX10_SDK_VERSION: 33 | // ----------------- 34 | // This identifier is passed to D3DX10CheckVersion in order to ensure that an 35 | // application was built against the correct header files and lib files. 36 | // This number is incremented whenever a header (or other) change would 37 | // require applications to be rebuilt. If the version doesn't match, 38 | // D3DX10CreateVersion will return FALSE. (The number itself has no meaning.) 39 | /////////////////////////////////////////////////////////////////////////// 40 | 41 | 42 | #define D3DX10_SDK_VERSION 43 43 | 44 | 45 | /////////////////////////////////////////////////////////////////////////// 46 | // D3DX10CreateDevice 47 | // D3DX10CreateDeviceAndSwapChain 48 | // D3DX10GetFeatureLevel1 49 | /////////////////////////////////////////////////////////////////////////// 50 | HRESULT WINAPI D3DX10CreateDevice(IDXGIAdapter *pAdapter, 51 | D3D10_DRIVER_TYPE DriverType, 52 | HMODULE Software, 53 | UINT Flags, 54 | ID3D10Device **ppDevice); 55 | 56 | HRESULT WINAPI D3DX10CreateDeviceAndSwapChain(IDXGIAdapter *pAdapter, 57 | D3D10_DRIVER_TYPE DriverType, 58 | HMODULE Software, 59 | UINT Flags, 60 | DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, 61 | IDXGISwapChain **ppSwapChain, 62 | ID3D10Device **ppDevice); 63 | 64 | typedef interface ID3D10Device1 ID3D10Device1; 65 | HRESULT WINAPI D3DX10GetFeatureLevel1(ID3D10Device *pDevice, ID3D10Device1 **ppDevice1); 66 | 67 | 68 | #ifdef D3D_DIAG_DLL 69 | BOOL WINAPI D3DX10DebugMute(BOOL Mute); 70 | #endif 71 | HRESULT WINAPI D3DX10CheckVersion(UINT D3DSdkVersion, UINT D3DX10SdkVersion); 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif //__cplusplus 76 | 77 | 78 | ////////////////////////////////////////////////////////////////////////////// 79 | // D3DX10_SPRITE flags: 80 | // ----------------- 81 | // D3DX10_SPRITE_SAVE_STATE 82 | // Specifies device state should be saved and restored in Begin/End. 83 | // D3DX10SPRITE_SORT_TEXTURE 84 | // Sprites are sorted by texture prior to drawing. This is recommended when 85 | // drawing non-overlapping sprites of uniform depth. For example, drawing 86 | // screen-aligned text with ID3DX10Font. 87 | // D3DX10SPRITE_SORT_DEPTH_FRONT_TO_BACK 88 | // Sprites are sorted by depth front-to-back prior to drawing. This is 89 | // recommended when drawing opaque sprites of varying depths. 90 | // D3DX10SPRITE_SORT_DEPTH_BACK_TO_FRONT 91 | // Sprites are sorted by depth back-to-front prior to drawing. This is 92 | // recommended when drawing transparent sprites of varying depths. 93 | // D3DX10SPRITE_ADDREF_TEXTURES 94 | // AddRef/Release all textures passed in to DrawSpritesBuffered 95 | ////////////////////////////////////////////////////////////////////////////// 96 | 97 | typedef enum _D3DX10_SPRITE_FLAG 98 | { 99 | D3DX10_SPRITE_SORT_TEXTURE = 0x01, 100 | D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT = 0x02, 101 | D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK = 0x04, 102 | D3DX10_SPRITE_SAVE_STATE = 0x08, 103 | D3DX10_SPRITE_ADDREF_TEXTURES = 0x10, 104 | } D3DX10_SPRITE_FLAG; 105 | 106 | typedef struct _D3DX10_SPRITE 107 | { 108 | D3DXMATRIX matWorld; 109 | 110 | D3DXVECTOR2 TexCoord; 111 | D3DXVECTOR2 TexSize; 112 | 113 | D3DXCOLOR ColorModulate; 114 | 115 | ID3D10ShaderResourceView *pTexture; 116 | UINT TextureIndex; 117 | } D3DX10_SPRITE; 118 | 119 | 120 | ////////////////////////////////////////////////////////////////////////////// 121 | // ID3DX10Sprite: 122 | // ------------ 123 | // This object intends to provide an easy way to drawing sprites using D3D. 124 | // 125 | // Begin - 126 | // Prepares device for drawing sprites. 127 | // 128 | // Draw - 129 | // Draws a sprite 130 | // 131 | // Flush - 132 | // Forces all batched sprites to submitted to the device. 133 | // 134 | // End - 135 | // Restores device state to how it was when Begin was called. 136 | // 137 | ////////////////////////////////////////////////////////////////////////////// 138 | 139 | typedef interface ID3DX10Sprite ID3DX10Sprite; 140 | typedef interface ID3DX10Sprite *LPD3DX10SPRITE; 141 | 142 | 143 | // {BA0B762D-8D28-43ec-B9DC-2F84443B0614} 144 | DEFINE_GUID(IID_ID3DX10Sprite, 145 | 0xba0b762d, 0x8d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14); 146 | 147 | 148 | #undef INTERFACE 149 | #define INTERFACE ID3DX10Sprite 150 | 151 | DECLARE_INTERFACE_(ID3DX10Sprite, IUnknown) 152 | { 153 | // IUnknown 154 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 155 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 156 | STDMETHOD_(ULONG, Release)(THIS) PURE; 157 | 158 | // ID3DX10Sprite 159 | STDMETHOD(Begin)(THIS_ UINT flags) PURE; 160 | 161 | STDMETHOD(DrawSpritesBuffered)(THIS_ D3DX10_SPRITE *pSprites, UINT cSprites) PURE; 162 | STDMETHOD(Flush)(THIS) PURE; 163 | 164 | STDMETHOD(DrawSpritesImmediate)(THIS_ D3DX10_SPRITE *pSprites, UINT cSprites, UINT cbSprite, UINT flags) PURE; 165 | STDMETHOD(End)(THIS) PURE; 166 | 167 | STDMETHOD(GetViewTransform)(THIS_ D3DXMATRIX *pViewTransform) PURE; 168 | STDMETHOD(SetViewTransform)(THIS_ D3DXMATRIX *pViewTransform) PURE; 169 | STDMETHOD(GetProjectionTransform)(THIS_ D3DXMATRIX *pProjectionTransform) PURE; 170 | STDMETHOD(SetProjectionTransform)(THIS_ D3DXMATRIX *pProjectionTransform) PURE; 171 | 172 | STDMETHOD(GetDevice)(THIS_ ID3D10Device** ppDevice) PURE; 173 | }; 174 | 175 | 176 | #ifdef __cplusplus 177 | extern "C" { 178 | #endif //__cplusplus 179 | 180 | HRESULT WINAPI 181 | D3DX10CreateSprite( 182 | ID3D10Device* pDevice, 183 | UINT cDeviceBufferSize, 184 | LPD3DX10SPRITE* ppSprite); 185 | 186 | #ifdef __cplusplus 187 | } 188 | #endif //__cplusplus 189 | 190 | 191 | ////////////////////////////////////////////////////////////////////////////// 192 | // ID3DX10ThreadPump: 193 | ////////////////////////////////////////////////////////////////////////////// 194 | 195 | #undef INTERFACE 196 | #define INTERFACE ID3DX10DataLoader 197 | 198 | DECLARE_INTERFACE(ID3DX10DataLoader) 199 | { 200 | STDMETHOD(Load)(THIS) PURE; 201 | STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE; 202 | STDMETHOD(Destroy)(THIS) PURE; 203 | }; 204 | 205 | #undef INTERFACE 206 | #define INTERFACE ID3DX10DataProcessor 207 | 208 | DECLARE_INTERFACE(ID3DX10DataProcessor) 209 | { 210 | STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE; 211 | STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE; 212 | STDMETHOD(Destroy)(THIS) PURE; 213 | }; 214 | 215 | // {C93FECFA-6967-478a-ABBC-402D90621FCB} 216 | DEFINE_GUID(IID_ID3DX10ThreadPump, 217 | 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb); 218 | 219 | #undef INTERFACE 220 | #define INTERFACE ID3DX10ThreadPump 221 | 222 | DECLARE_INTERFACE_(ID3DX10ThreadPump, IUnknown) 223 | { 224 | // IUnknown 225 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 226 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 227 | STDMETHOD_(ULONG, Release)(THIS) PURE; 228 | 229 | // ID3DX10ThreadPump 230 | STDMETHOD(AddWorkItem)(THIS_ ID3DX10DataLoader *pDataLoader, ID3DX10DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE; 231 | STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE; 232 | 233 | STDMETHOD(WaitForAllItems)(THIS) PURE; 234 | STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount); 235 | 236 | STDMETHOD(PurgeAllItems)(THIS) PURE; 237 | STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE; 238 | 239 | }; 240 | 241 | HRESULT WINAPI D3DX10CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX10ThreadPump **ppThreadPump); 242 | 243 | 244 | ////////////////////////////////////////////////////////////////////////////// 245 | // ID3DX10Font: 246 | // ---------- 247 | // Font objects contain the textures and resources needed to render a specific 248 | // font on a specific device. 249 | // 250 | // GetGlyphData - 251 | // Returns glyph cache data, for a given glyph. 252 | // 253 | // PreloadCharacters/PreloadGlyphs/PreloadText - 254 | // Preloads glyphs into the glyph cache textures. 255 | // 256 | // DrawText - 257 | // Draws formatted text on a D3D device. Some parameters are 258 | // surprisingly similar to those of GDI's DrawText function. See GDI 259 | // documentation for a detailed description of these parameters. 260 | // If pSprite is NULL, an internal sprite object will be used. 261 | // 262 | ////////////////////////////////////////////////////////////////////////////// 263 | 264 | typedef struct _D3DX10_FONT_DESCA 265 | { 266 | INT Height; 267 | UINT Width; 268 | UINT Weight; 269 | UINT MipLevels; 270 | BOOL Italic; 271 | BYTE CharSet; 272 | BYTE OutputPrecision; 273 | BYTE Quality; 274 | BYTE PitchAndFamily; 275 | CHAR FaceName[LF_FACESIZE]; 276 | 277 | } D3DX10_FONT_DESCA, *LPD3DX10_FONT_DESCA; 278 | 279 | typedef struct _D3DX10_FONT_DESCW 280 | { 281 | INT Height; 282 | UINT Width; 283 | UINT Weight; 284 | UINT MipLevels; 285 | BOOL Italic; 286 | BYTE CharSet; 287 | BYTE OutputPrecision; 288 | BYTE Quality; 289 | BYTE PitchAndFamily; 290 | WCHAR FaceName[LF_FACESIZE]; 291 | 292 | } D3DX10_FONT_DESCW, *LPD3DX10_FONT_DESCW; 293 | 294 | #ifdef UNICODE 295 | typedef D3DX10_FONT_DESCW D3DX10_FONT_DESC; 296 | typedef LPD3DX10_FONT_DESCW LPD3DX10_FONT_DESC; 297 | #else 298 | typedef D3DX10_FONT_DESCA D3DX10_FONT_DESC; 299 | typedef LPD3DX10_FONT_DESCA LPD3DX10_FONT_DESC; 300 | #endif 301 | 302 | 303 | typedef interface ID3DX10Font ID3DX10Font; 304 | typedef interface ID3DX10Font *LPD3DX10FONT; 305 | 306 | 307 | // {D79DBB70-5F21-4d36-BBC2-FF525C213CDC} 308 | DEFINE_GUID(IID_ID3DX10Font, 309 | 0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc); 310 | 311 | 312 | #undef INTERFACE 313 | #define INTERFACE ID3DX10Font 314 | 315 | DECLARE_INTERFACE_(ID3DX10Font, IUnknown) 316 | { 317 | // IUnknown 318 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 319 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 320 | STDMETHOD_(ULONG, Release)(THIS) PURE; 321 | 322 | // ID3DX10Font 323 | STDMETHOD(GetDevice)(THIS_ ID3D10Device** ppDevice) PURE; 324 | STDMETHOD(GetDescA)(THIS_ D3DX10_FONT_DESCA *pDesc) PURE; 325 | STDMETHOD(GetDescW)(THIS_ D3DX10_FONT_DESCW *pDesc) PURE; 326 | STDMETHOD_(BOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *pTextMetrics) PURE; 327 | STDMETHOD_(BOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *pTextMetrics) PURE; 328 | 329 | STDMETHOD_(HDC, GetDC)(THIS) PURE; 330 | STDMETHOD(GetGlyphData)(THIS_ UINT Glyph, ID3D10ShaderResourceView** ppTexture, RECT *pBlackBox, POINT *pCellInc) PURE; 331 | 332 | STDMETHOD(PreloadCharacters)(THIS_ UINT First, UINT Last) PURE; 333 | STDMETHOD(PreloadGlyphs)(THIS_ UINT First, UINT Last) PURE; 334 | STDMETHOD(PreloadTextA)(THIS_ LPCSTR pString, INT Count) PURE; 335 | STDMETHOD(PreloadTextW)(THIS_ LPCWSTR pString, INT Count) PURE; 336 | 337 | STDMETHOD_(INT, DrawTextA)(THIS_ LPD3DX10SPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, UINT Format, D3DXCOLOR Color) PURE; 338 | STDMETHOD_(INT, DrawTextW)(THIS_ LPD3DX10SPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, UINT Format, D3DXCOLOR Color) PURE; 339 | 340 | #ifdef __cplusplus 341 | #ifdef UNICODE 342 | HRESULT WINAPI_INLINE GetDesc(D3DX10_FONT_DESCW *pDesc) { return GetDescW(pDesc); } 343 | HRESULT WINAPI_INLINE PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); } 344 | #else 345 | HRESULT WINAPI_INLINE GetDesc(D3DX10_FONT_DESCA *pDesc) { return GetDescA(pDesc); } 346 | HRESULT WINAPI_INLINE PreloadText(LPCSTR pString, INT Count) { return PreloadTextA(pString, Count); } 347 | #endif 348 | #endif //__cplusplus 349 | }; 350 | 351 | #ifndef GetTextMetrics 352 | #ifdef UNICODE 353 | #define GetTextMetrics GetTextMetricsW 354 | #else 355 | #define GetTextMetrics GetTextMetricsA 356 | #endif 357 | #endif 358 | 359 | #ifndef DrawText 360 | #ifdef UNICODE 361 | #define DrawText DrawTextW 362 | #else 363 | #define DrawText DrawTextA 364 | #endif 365 | #endif 366 | 367 | 368 | #ifdef __cplusplus 369 | extern "C" { 370 | #endif //__cplusplus 371 | 372 | 373 | HRESULT WINAPI 374 | D3DX10CreateFontA( 375 | ID3D10Device* pDevice, 376 | INT Height, 377 | UINT Width, 378 | UINT Weight, 379 | UINT MipLevels, 380 | BOOL Italic, 381 | UINT CharSet, 382 | UINT OutputPrecision, 383 | UINT Quality, 384 | UINT PitchAndFamily, 385 | LPCSTR pFaceName, 386 | LPD3DX10FONT* ppFont); 387 | 388 | HRESULT WINAPI 389 | D3DX10CreateFontW( 390 | ID3D10Device* pDevice, 391 | INT Height, 392 | UINT Width, 393 | UINT Weight, 394 | UINT MipLevels, 395 | BOOL Italic, 396 | UINT CharSet, 397 | UINT OutputPrecision, 398 | UINT Quality, 399 | UINT PitchAndFamily, 400 | LPCWSTR pFaceName, 401 | LPD3DX10FONT* ppFont); 402 | 403 | #ifdef UNICODE 404 | #define D3DX10CreateFont D3DX10CreateFontW 405 | #else 406 | #define D3DX10CreateFont D3DX10CreateFontA 407 | #endif 408 | 409 | 410 | HRESULT WINAPI 411 | D3DX10CreateFontIndirectA( 412 | ID3D10Device* pDevice, 413 | CONST D3DX10_FONT_DESCA* pDesc, 414 | LPD3DX10FONT* ppFont); 415 | 416 | HRESULT WINAPI 417 | D3DX10CreateFontIndirectW( 418 | ID3D10Device* pDevice, 419 | CONST D3DX10_FONT_DESCW* pDesc, 420 | LPD3DX10FONT* ppFont); 421 | 422 | #ifdef UNICODE 423 | #define D3DX10CreateFontIndirect D3DX10CreateFontIndirectW 424 | #else 425 | #define D3DX10CreateFontIndirect D3DX10CreateFontIndirectA 426 | #endif 427 | 428 | HRESULT WINAPI D3DX10UnsetAllDeviceObjects(ID3D10Device *pDevice); 429 | 430 | #ifdef __cplusplus 431 | } 432 | #endif //__cplusplus 433 | 434 | /////////////////////////////////////////////////////////////////////////// 435 | 436 | #define _FACD3D 0x876 437 | #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) 438 | #define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code ) 439 | 440 | #define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) 441 | #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) 442 | 443 | #endif //__D3DX10CORE_H__ 444 | 445 | -------------------------------------------------------------------------------- /Include/d3dx10mesh.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx10mesh.h 6 | // Content: D3DX10 mesh types and functions 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx10.h" 11 | 12 | #ifndef __D3DX10MESH_H__ 13 | #define __D3DX10MESH_H__ 14 | 15 | // {7ED943DD-52E8-40b5-A8D8-76685C406330} 16 | DEFINE_GUID(IID_ID3DX10BaseMesh, 17 | 0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30); 18 | 19 | // {04B0D117-1041-46b1-AA8A-3952848BA22E} 20 | DEFINE_GUID(IID_ID3DX10MeshBuffer, 21 | 0x4b0d117, 0x1041, 0x46b1, 0xaa, 0x8a, 0x39, 0x52, 0x84, 0x8b, 0xa2, 0x2e); 22 | 23 | // {4020E5C2-1403-4929-883F-E2E849FAC195} 24 | DEFINE_GUID(IID_ID3DX10Mesh, 25 | 0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95); 26 | 27 | // {8875769A-D579-4088-AAEB-534D1AD84E96} 28 | DEFINE_GUID(IID_ID3DX10PMesh, 29 | 0x8875769a, 0xd579, 0x4088, 0xaa, 0xeb, 0x53, 0x4d, 0x1a, 0xd8, 0x4e, 0x96); 30 | 31 | // {667EA4C7-F1CD-4386-B523-7C0290B83CC5} 32 | DEFINE_GUID(IID_ID3DX10SPMesh, 33 | 0x667ea4c7, 0xf1cd, 0x4386, 0xb5, 0x23, 0x7c, 0x2, 0x90, 0xb8, 0x3c, 0xc5); 34 | 35 | // {3CE6CC22-DBF2-44f4-894D-F9C34A337139} 36 | DEFINE_GUID(IID_ID3DX10PatchMesh, 37 | 0x3ce6cc22, 0xdbf2, 0x44f4, 0x89, 0x4d, 0xf9, 0xc3, 0x4a, 0x33, 0x71, 0x39); 38 | 39 | 40 | // Mesh options - lower 3 bytes only, upper byte used by _D3DX10MESHOPT option flags 41 | enum _D3DX10_MESH { 42 | D3DX10_MESH_32_BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. 43 | D3DX10_MESH_GS_ADJACENCY = 0x004, // If set, mesh contains GS adjacency info. Not valid on input. 44 | 45 | }; 46 | 47 | typedef struct _D3DX10_ATTRIBUTE_RANGE 48 | { 49 | UINT AttribId; 50 | UINT FaceStart; 51 | UINT FaceCount; 52 | UINT VertexStart; 53 | UINT VertexCount; 54 | } D3DX10_ATTRIBUTE_RANGE; 55 | 56 | typedef D3DX10_ATTRIBUTE_RANGE* LPD3DX10_ATTRIBUTE_RANGE; 57 | 58 | typedef enum _D3DX10_MESH_DISCARD_FLAGS 59 | { 60 | D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER = 0x01, 61 | D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE = 0x02, 62 | D3DX10_MESH_DISCARD_POINTREPS = 0x04, 63 | D3DX10_MESH_DISCARD_ADJACENCY = 0x08, 64 | D3DX10_MESH_DISCARD_DEVICE_BUFFERS = 0x10, 65 | 66 | } D3DX10_MESH_DISCARD_FLAGS; 67 | 68 | typedef struct _D3DX10_WELD_EPSILONS 69 | { 70 | FLOAT Position; // NOTE: This does NOT replace the epsilon in GenerateAdjacency 71 | // in general, it should be the same value or greater than the one passed to GeneratedAdjacency 72 | FLOAT BlendWeights; 73 | FLOAT Normal; 74 | FLOAT PSize; 75 | FLOAT Specular; 76 | FLOAT Diffuse; 77 | FLOAT Texcoord[8]; 78 | FLOAT Tangent; 79 | FLOAT Binormal; 80 | FLOAT TessFactor; 81 | } D3DX10_WELD_EPSILONS; 82 | 83 | typedef D3DX10_WELD_EPSILONS* LPD3DX10_WELD_EPSILONS; 84 | 85 | typedef struct _D3DX10_INTERSECT_INFO 86 | { 87 | UINT FaceIndex; // index of face intersected 88 | FLOAT U; // Barycentric Hit Coordinates 89 | FLOAT V; // Barycentric Hit Coordinates 90 | FLOAT Dist; // Ray-Intersection Parameter Distance 91 | } D3DX10_INTERSECT_INFO, *LPD3DX10_INTERSECT_INFO; 92 | 93 | // ID3DX10MeshBuffer is used by D3DX10Mesh vertex and index buffers 94 | #undef INTERFACE 95 | #define INTERFACE ID3DX10MeshBuffer 96 | 97 | DECLARE_INTERFACE_(ID3DX10MeshBuffer, IUnknown) 98 | { 99 | // IUnknown 100 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 101 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 102 | STDMETHOD_(ULONG, Release)(THIS) PURE; 103 | 104 | // ID3DX10MeshBuffer 105 | STDMETHOD(Map)(THIS_ void **ppData, SIZE_T *pSize) PURE; 106 | STDMETHOD(Unmap)(THIS) PURE; 107 | STDMETHOD_(SIZE_T, GetSize)(THIS) PURE; 108 | }; 109 | 110 | // D3DX10 Mesh interfaces 111 | #undef INTERFACE 112 | #define INTERFACE ID3DX10Mesh 113 | 114 | DECLARE_INTERFACE_(ID3DX10Mesh, IUnknown) 115 | { 116 | // IUnknown 117 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 118 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 119 | STDMETHOD_(ULONG, Release)(THIS) PURE; 120 | 121 | // ID3DX10Mesh 122 | STDMETHOD_(UINT, GetFaceCount)(THIS) PURE; 123 | STDMETHOD_(UINT, GetVertexCount)(THIS) PURE; 124 | STDMETHOD_(UINT, GetVertexBufferCount)(THIS) PURE; 125 | STDMETHOD_(UINT, GetFlags)(THIS) PURE; 126 | STDMETHOD(GetVertexDescription)(THIS_ CONST D3D10_INPUT_ELEMENT_DESC **ppDesc, UINT *pDeclCount) PURE; 127 | 128 | STDMETHOD(SetVertexData)(THIS_ UINT iBuffer, CONST void *pData) PURE; 129 | STDMETHOD(GetVertexBuffer)(THIS_ UINT iBuffer, ID3DX10MeshBuffer **ppVertexBuffer) PURE; 130 | 131 | STDMETHOD(SetIndexData)(THIS_ CONST void *pData, UINT cIndices) PURE; 132 | STDMETHOD(GetIndexBuffer)(THIS_ ID3DX10MeshBuffer **ppIndexBuffer) PURE; 133 | 134 | STDMETHOD(SetAttributeData)(THIS_ CONST UINT *pData) PURE; 135 | STDMETHOD(GetAttributeBuffer)(THIS_ ID3DX10MeshBuffer **ppAttributeBuffer) PURE; 136 | 137 | STDMETHOD(SetAttributeTable)(THIS_ CONST D3DX10_ATTRIBUTE_RANGE *pAttribTable, UINT cAttribTableSize) PURE; 138 | STDMETHOD(GetAttributeTable)(THIS_ D3DX10_ATTRIBUTE_RANGE *pAttribTable, UINT *pAttribTableSize) PURE; 139 | 140 | STDMETHOD(GenerateAdjacencyAndPointReps)(THIS_ FLOAT Epsilon) PURE; 141 | STDMETHOD(GenerateGSAdjacency)(THIS) PURE; 142 | 143 | STDMETHOD(SetAdjacencyData)(THIS_ CONST UINT *pAdjacency) PURE; 144 | STDMETHOD(GetAdjacencyBuffer)(THIS_ ID3DX10MeshBuffer **ppAdjacency) PURE; 145 | 146 | STDMETHOD(SetPointRepData)(THIS_ CONST UINT *pPointReps) PURE; 147 | STDMETHOD(GetPointRepBuffer)(THIS_ ID3DX10MeshBuffer **ppPointReps) PURE; 148 | 149 | STDMETHOD(Discard)(THIS_ D3DX10_MESH_DISCARD_FLAGS dwDiscard) PURE; 150 | STDMETHOD(CloneMesh)(THIS_ UINT Flags, LPCSTR pPosSemantic, CONST D3D10_INPUT_ELEMENT_DESC *pDesc, UINT DeclCount, ID3DX10Mesh** ppCloneMesh) PURE; 151 | 152 | STDMETHOD(Optimize)(THIS_ UINT Flags, UINT * pFaceRemap, LPD3D10BLOB *ppVertexRemap) PURE; 153 | STDMETHOD(GenerateAttributeBufferFromTable)(THIS) PURE; 154 | 155 | STDMETHOD(Intersect)(THIS_ D3DXVECTOR3 *pRayPos, D3DXVECTOR3 *pRayDir, 156 | UINT *pHitCount, UINT *pFaceIndex, float *pU, float *pV, float *pDist, ID3D10Blob **ppAllHits); 157 | STDMETHOD(IntersectSubset)(THIS_ UINT AttribId, D3DXVECTOR3 *pRayPos, D3DXVECTOR3 *pRayDir, 158 | UINT *pHitCount, UINT *pFaceIndex, float *pU, float *pV, float *pDist, ID3D10Blob **ppAllHits); 159 | 160 | // ID3DX10Mesh - Device functions 161 | STDMETHOD(CommitToDevice)(THIS) PURE; 162 | STDMETHOD(DrawSubset)(THIS_ UINT AttribId) PURE; 163 | STDMETHOD(DrawSubsetInstanced)(THIS_ UINT AttribId, UINT InstanceCount, UINT StartInstanceLocation) PURE; 164 | 165 | STDMETHOD(GetDeviceVertexBuffer)(THIS_ UINT iBuffer, ID3D10Buffer **ppVertexBuffer) PURE; 166 | STDMETHOD(GetDeviceIndexBuffer)(THIS_ ID3D10Buffer **ppIndexBuffer) PURE; 167 | }; 168 | 169 | 170 | // Flat API 171 | #ifdef __cplusplus 172 | extern "C" { 173 | #endif //__cplusplus 174 | 175 | HRESULT WINAPI 176 | D3DX10CreateMesh( 177 | ID3D10Device *pDevice, 178 | CONST D3D10_INPUT_ELEMENT_DESC *pDeclaration, 179 | UINT DeclCount, 180 | LPCSTR pPositionSemantic, 181 | UINT VertexCount, 182 | UINT FaceCount, 183 | UINT Options, 184 | ID3DX10Mesh **ppMesh); 185 | 186 | #ifdef __cplusplus 187 | } 188 | #endif //__cplusplus 189 | 190 | 191 | // ID3DX10Mesh::Optimize options - upper byte only, lower 3 bytes used from _D3DX10MESH option flags 192 | enum _D3DX10_MESHOPT { 193 | D3DX10_MESHOPT_COMPACT = 0x01000000, 194 | D3DX10_MESHOPT_ATTR_SORT = 0x02000000, 195 | D3DX10_MESHOPT_VERTEX_CACHE = 0x04000000, 196 | D3DX10_MESHOPT_STRIP_REORDER = 0x08000000, 197 | D3DX10_MESHOPT_IGNORE_VERTS = 0x10000000, // optimize faces only, don't touch vertices 198 | D3DX10_MESHOPT_DO_NOT_SPLIT = 0x20000000, // do not split vertices shared between attribute groups when attribute sorting 199 | D3DX10_MESHOPT_DEVICE_INDEPENDENT = 0x00400000, // Only affects VCache. uses a static known good cache size for all cards 200 | 201 | // D3DX10_MESHOPT_SHAREVB has been removed, please use D3DX10MESH_VB_SHARE instead 202 | 203 | }; 204 | 205 | 206 | ////////////////////////////////////////////////////////////////////////// 207 | // ID3DXSkinInfo 208 | ////////////////////////////////////////////////////////////////////////// 209 | 210 | // {420BD604-1C76-4a34-A466-E45D0658A32C} 211 | DEFINE_GUID(IID_ID3DX10SkinInfo, 212 | 0x420bd604, 0x1c76, 0x4a34, 0xa4, 0x66, 0xe4, 0x5d, 0x6, 0x58, 0xa3, 0x2c); 213 | 214 | // scaling modes for ID3DX10SkinInfo::Compact() & ID3DX10SkinInfo::UpdateMesh() 215 | #define D3DX10_SKININFO_NO_SCALING 0 216 | #define D3DX10_SKININFO_SCALE_TO_1 1 217 | #define D3DX10_SKININFO_SCALE_TO_TOTAL 2 218 | 219 | typedef struct _D3DX10_SKINNING_CHANNEL 220 | { 221 | UINT SrcOffset; 222 | UINT DestOffset; 223 | BOOL IsNormal; 224 | } D3DX10_SKINNING_CHANNEL; 225 | 226 | #undef INTERFACE 227 | #define INTERFACE ID3DX10SkinInfo 228 | 229 | typedef struct ID3DX10SkinInfo *LPD3DX10SKININFO; 230 | 231 | DECLARE_INTERFACE_(ID3DX10SkinInfo, IUnknown) 232 | { 233 | // IUnknown 234 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 235 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 236 | STDMETHOD_(ULONG, Release)(THIS) PURE; 237 | 238 | STDMETHOD_(UINT , GetNumVertices)(THIS) PURE; 239 | STDMETHOD_(UINT , GetNumBones)(THIS) PURE; 240 | STDMETHOD_(UINT , GetMaxBoneInfluences)(THIS) PURE; 241 | 242 | STDMETHOD(AddVertices)(THIS_ UINT Count) PURE; 243 | STDMETHOD(RemapVertices)(THIS_ UINT NewVertexCount, UINT *pVertexRemap) PURE; 244 | 245 | STDMETHOD(AddBones)(THIS_ UINT Count) PURE; 246 | STDMETHOD(RemoveBone)(THIS_ UINT Index) PURE; 247 | STDMETHOD(RemapBones)(THIS_ UINT NewBoneCount, UINT *pBoneRemap) PURE; 248 | 249 | STDMETHOD(AddBoneInfluences)(THIS_ UINT BoneIndex, UINT InfluenceCount, UINT *pIndices, float *pWeights) PURE; 250 | STDMETHOD(ClearBoneInfluences)(THIS_ UINT BoneIndex) PURE; 251 | STDMETHOD_(UINT , GetBoneInfluenceCount)(THIS_ UINT BoneIndex) PURE; 252 | STDMETHOD(GetBoneInfluences)(THIS_ UINT BoneIndex, UINT Offset, UINT Count, UINT *pDestIndices, float *pDestWeights) PURE; 253 | STDMETHOD(FindBoneInfluenceIndex)(THIS_ UINT BoneIndex, UINT VertexIndex, UINT *pInfluenceIndex) PURE; 254 | STDMETHOD(SetBoneInfluence)(THIS_ UINT BoneIndex, UINT InfluenceIndex, float Weight) PURE; 255 | STDMETHOD(GetBoneInfluence)(THIS_ UINT BoneIndex, UINT InfluenceIndex, float *pWeight) PURE; 256 | 257 | STDMETHOD(Compact)(THIS_ UINT MaxPerVertexInfluences, UINT ScaleMode, float MinWeight) PURE; 258 | STDMETHOD(DoSoftwareSkinning)(UINT StartVertex, UINT VertexCount, void *pSrcVertices, UINT SrcStride, void *pDestVertices, UINT DestStride, D3DXMATRIX *pBoneMatrices, D3DXMATRIX *pInverseTransposeBoneMatrices, D3DX10_SKINNING_CHANNEL *pChannelDescs, UINT NumChannels) PURE; 259 | }; 260 | 261 | #ifdef __cplusplus 262 | extern "C" { 263 | #endif //__cplusplus 264 | 265 | HRESULT WINAPI 266 | D3DX10CreateSkinInfo(LPD3DX10SKININFO* ppSkinInfo); 267 | 268 | #ifdef __cplusplus 269 | } 270 | #endif //__cplusplus 271 | 272 | typedef struct _D3DX10_ATTRIBUTE_WEIGHTS 273 | { 274 | FLOAT Position; 275 | FLOAT Boundary; 276 | FLOAT Normal; 277 | FLOAT Diffuse; 278 | FLOAT Specular; 279 | FLOAT Texcoord[8]; 280 | FLOAT Tangent; 281 | FLOAT Binormal; 282 | } D3DX10_ATTRIBUTE_WEIGHTS, *LPD3DX10_ATTRIBUTE_WEIGHTS; 283 | 284 | #endif //__D3DX10MESH_H__ 285 | 286 | 287 | -------------------------------------------------------------------------------- /Include/d3dx11.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx11.h 6 | // Content: D3DX11 utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX11_INTERNAL__ 11 | #error Incorrect D3DX11 header used 12 | #endif 13 | 14 | #ifndef __D3DX11_H__ 15 | #define __D3DX11_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | #include 21 | 22 | #ifdef ALLOW_THROWING_NEW 23 | #include 24 | #endif 25 | 26 | #define D3DX11_DEFAULT ((UINT) -1) 27 | #define D3DX11_FROM_FILE ((UINT) -3) 28 | #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) 29 | 30 | #ifndef D3DX11INLINE 31 | #ifdef _MSC_VER 32 | #if (_MSC_VER >= 1200) 33 | #define D3DX11INLINE __forceinline 34 | #else 35 | #define D3DX11INLINE __inline 36 | #endif 37 | #else 38 | #ifdef __cplusplus 39 | #define D3DX11INLINE inline 40 | #else 41 | #define D3DX11INLINE 42 | #endif 43 | #endif 44 | #endif 45 | 46 | 47 | 48 | // Includes 49 | #include "d3d11.h" 50 | #include "d3dx11.h" 51 | #include "d3dx11core.h" 52 | #include "d3dx11tex.h" 53 | #include "d3dx11async.h" 54 | 55 | 56 | // Errors 57 | #define _FACDD 0x876 58 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 59 | 60 | enum _D3DX11_ERR { 61 | D3DX11_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), 62 | D3DX11_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), 63 | D3DX11_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), 64 | D3DX11_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), 65 | D3DX11_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), 66 | D3DX11_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), 67 | D3DX11_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), 68 | D3DX11_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), 69 | D3DX11_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), 70 | }; 71 | 72 | 73 | #endif //__D3DX11_H__ 74 | 75 | -------------------------------------------------------------------------------- /Include/d3dx11async.h: -------------------------------------------------------------------------------- 1 | 2 | ////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | // 6 | // File: D3DX11Async.h 7 | // Content: D3DX11 Asynchronous Shader loaders / compilers 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | 11 | #ifndef __D3DX11ASYNC_H__ 12 | #define __D3DX11ASYNC_H__ 13 | 14 | #include "d3dx11.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif //__cplusplus 19 | 20 | 21 | //---------------------------------------------------------------------------- 22 | // D3DX11Compile: 23 | // ------------------ 24 | // Compiles an effect or shader. 25 | // 26 | // Parameters: 27 | // pSrcFile 28 | // Source file name. 29 | // hSrcModule 30 | // Module handle. if NULL, current module will be used. 31 | // pSrcResource 32 | // Resource name in module. 33 | // pSrcData 34 | // Pointer to source code. 35 | // SrcDataLen 36 | // Size of source code, in bytes. 37 | // pDefines 38 | // Optional NULL-terminated array of preprocessor macro definitions. 39 | // pInclude 40 | // Optional interface pointer to use for handling #include directives. 41 | // If this parameter is NULL, #includes will be honored when compiling 42 | // from file, and will error when compiling from resource or memory. 43 | // pFunctionName 44 | // Name of the entrypoint function where execution should begin. 45 | // pProfile 46 | // Instruction set to be used when generating code. Currently supported 47 | // profiles are "vs_1_1", "vs_2_0", "vs_2_a", "vs_2_sw", "vs_3_0", 48 | // "vs_3_sw", "vs_4_0", "vs_4_1", 49 | // "ps_2_0", "ps_2_a", "ps_2_b", "ps_2_sw", "ps_3_0", 50 | // "ps_3_sw", "ps_4_0", "ps_4_1", 51 | // "gs_4_0", "gs_4_1", 52 | // "tx_1_0", 53 | // "fx_4_0", "fx_4_1" 54 | // Note that this entrypoint does not compile fx_2_0 targets, for that 55 | // you need to use the D3DX9 function. 56 | // Flags1 57 | // See D3D10_SHADER_xxx flags. 58 | // Flags2 59 | // See D3D10_EFFECT_xxx flags. 60 | // ppShader 61 | // Returns a buffer containing the created shader. This buffer contains 62 | // the compiled shader code, as well as any embedded debug and symbol 63 | // table info. (See D3D10GetShaderConstantTable) 64 | // ppErrorMsgs 65 | // Returns a buffer containing a listing of errors and warnings that were 66 | // encountered during the compile. If you are running in a debugger, 67 | // these are the same messages you will see in your debug output. 68 | // pHResult 69 | // Pointer to a memory location to receive the return value upon completion. 70 | // Maybe NULL if not needed. 71 | // If pPump != NULL, pHResult must be a valid memory location until the 72 | // the asynchronous execution completes. 73 | //---------------------------------------------------------------------------- 74 | 75 | HRESULT WINAPI D3DX11CompileFromFileA(LPCSTR pSrcFile,CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 76 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 77 | 78 | HRESULT WINAPI D3DX11CompileFromFileW(LPCWSTR pSrcFile, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 79 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 80 | 81 | #ifdef UNICODE 82 | #define D3DX11CompileFromFile D3DX11CompileFromFileW 83 | #else 84 | #define D3DX11CompileFromFile D3DX11CompileFromFileA 85 | #endif 86 | 87 | HRESULT WINAPI D3DX11CompileFromResourceA(HMODULE hSrcModule, LPCSTR pSrcResource, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 88 | LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 89 | 90 | HRESULT WINAPI D3DX11CompileFromResourceW(HMODULE hSrcModule, LPCWSTR pSrcResource, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 91 | LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 92 | 93 | #ifdef UNICODE 94 | #define D3DX11CompileFromResource D3DX11CompileFromResourceW 95 | #else 96 | #define D3DX11CompileFromResource D3DX11CompileFromResourceA 97 | #endif 98 | 99 | HRESULT WINAPI D3DX11CompileFromMemory(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 100 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 101 | 102 | HRESULT WINAPI D3DX11PreprocessShaderFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, 103 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 104 | 105 | HRESULT WINAPI D3DX11PreprocessShaderFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, 106 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 107 | 108 | HRESULT WINAPI D3DX11PreprocessShaderFromMemory(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, 109 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 110 | 111 | HRESULT WINAPI D3DX11PreprocessShaderFromResourceA(HMODULE hModule, LPCSTR pResourceName, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 112 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 113 | 114 | HRESULT WINAPI D3DX11PreprocessShaderFromResourceW(HMODULE hModule, LPCWSTR pResourceName, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 115 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 116 | 117 | #ifdef UNICODE 118 | #define D3DX11PreprocessShaderFromFile D3DX11PreprocessShaderFromFileW 119 | #define D3DX11PreprocessShaderFromResource D3DX11PreprocessShaderFromResourceW 120 | #else 121 | #define D3DX11PreprocessShaderFromFile D3DX11PreprocessShaderFromFileA 122 | #define D3DX11PreprocessShaderFromResource D3DX11PreprocessShaderFromResourceA 123 | #endif 124 | 125 | //---------------------------------------------------------------------------- 126 | // Async processors 127 | //---------------------------------------------------------------------------- 128 | 129 | HRESULT WINAPI D3DX11CreateAsyncCompilerProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 130 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, 131 | ID3D10Blob **ppCompiledShader, ID3D10Blob **ppErrorBuffer, ID3DX11DataProcessor **ppProcessor); 132 | 133 | HRESULT WINAPI D3DX11CreateAsyncShaderPreprocessProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 134 | ID3D10Blob** ppShaderText, ID3D10Blob **ppErrorBuffer, ID3DX11DataProcessor **ppProcessor); 135 | 136 | //---------------------------------------------------------------------------- 137 | // D3DX11 Asynchronous texture I/O (advanced mode) 138 | //---------------------------------------------------------------------------- 139 | 140 | HRESULT WINAPI D3DX11CreateAsyncFileLoaderW(LPCWSTR pFileName, ID3DX11DataLoader **ppDataLoader); 141 | HRESULT WINAPI D3DX11CreateAsyncFileLoaderA(LPCSTR pFileName, ID3DX11DataLoader **ppDataLoader); 142 | HRESULT WINAPI D3DX11CreateAsyncMemoryLoader(LPCVOID pData, SIZE_T cbData, ID3DX11DataLoader **ppDataLoader); 143 | HRESULT WINAPI D3DX11CreateAsyncResourceLoaderW(HMODULE hSrcModule, LPCWSTR pSrcResource, ID3DX11DataLoader **ppDataLoader); 144 | HRESULT WINAPI D3DX11CreateAsyncResourceLoaderA(HMODULE hSrcModule, LPCSTR pSrcResource, ID3DX11DataLoader **ppDataLoader); 145 | 146 | #ifdef UNICODE 147 | #define D3DX11CreateAsyncFileLoader D3DX11CreateAsyncFileLoaderW 148 | #define D3DX11CreateAsyncResourceLoader D3DX11CreateAsyncResourceLoaderW 149 | #else 150 | #define D3DX11CreateAsyncFileLoader D3DX11CreateAsyncFileLoaderA 151 | #define D3DX11CreateAsyncResourceLoader D3DX11CreateAsyncResourceLoaderA 152 | #endif 153 | 154 | HRESULT WINAPI D3DX11CreateAsyncTextureProcessor(ID3D11Device *pDevice, D3DX11_IMAGE_LOAD_INFO *pLoadInfo, ID3DX11DataProcessor **ppDataProcessor); 155 | HRESULT WINAPI D3DX11CreateAsyncTextureInfoProcessor(D3DX11_IMAGE_INFO *pImageInfo, ID3DX11DataProcessor **ppDataProcessor); 156 | HRESULT WINAPI D3DX11CreateAsyncShaderResourceViewProcessor(ID3D11Device *pDevice, D3DX11_IMAGE_LOAD_INFO *pLoadInfo, ID3DX11DataProcessor **ppDataProcessor); 157 | 158 | #ifdef __cplusplus 159 | } 160 | #endif //__cplusplus 161 | 162 | #endif //__D3DX11ASYNC_H__ 163 | 164 | 165 | -------------------------------------------------------------------------------- /Include/d3dx11core.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx11core.h 6 | // Content: D3DX11 core types and functions 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx11.h" 11 | 12 | #ifndef __D3DX11CORE_H__ 13 | #define __D3DX11CORE_H__ 14 | 15 | // Current name of the DLL shipped in the same SDK as this header. 16 | 17 | 18 | #define D3DX11_DLL_W L"d3dx11_43.dll" 19 | #define D3DX11_DLL_A "d3dx11_43.dll" 20 | 21 | #ifdef UNICODE 22 | #define D3DX11_DLL D3DX11_DLL_W 23 | #else 24 | #define D3DX11_DLL D3DX11_DLL_A 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif //__cplusplus 30 | 31 | /////////////////////////////////////////////////////////////////////////// 32 | // D3DX11_SDK_VERSION: 33 | // ----------------- 34 | // This identifier is passed to D3DX11CheckVersion in order to ensure that an 35 | // application was built against the correct header files and lib files. 36 | // This number is incremented whenever a header (or other) change would 37 | // require applications to be rebuilt. If the version doesn't match, 38 | // D3DX11CreateVersion will return FALSE. (The number itself has no meaning.) 39 | /////////////////////////////////////////////////////////////////////////// 40 | 41 | 42 | #define D3DX11_SDK_VERSION 43 43 | 44 | 45 | #ifdef D3D_DIAG_DLL 46 | BOOL WINAPI D3DX11DebugMute(BOOL Mute); 47 | #endif 48 | HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif //__cplusplus 53 | 54 | 55 | 56 | ////////////////////////////////////////////////////////////////////////////// 57 | // ID3DX11ThreadPump: 58 | ////////////////////////////////////////////////////////////////////////////// 59 | 60 | #undef INTERFACE 61 | #define INTERFACE ID3DX11DataLoader 62 | 63 | DECLARE_INTERFACE(ID3DX11DataLoader) 64 | { 65 | STDMETHOD(Load)(THIS) PURE; 66 | STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE; 67 | STDMETHOD(Destroy)(THIS) PURE; 68 | }; 69 | 70 | #undef INTERFACE 71 | #define INTERFACE ID3DX11DataProcessor 72 | 73 | DECLARE_INTERFACE(ID3DX11DataProcessor) 74 | { 75 | STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE; 76 | STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE; 77 | STDMETHOD(Destroy)(THIS) PURE; 78 | }; 79 | 80 | // {C93FECFA-6967-478a-ABBC-402D90621FCB} 81 | DEFINE_GUID(IID_ID3DX11ThreadPump, 82 | 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb); 83 | 84 | #undef INTERFACE 85 | #define INTERFACE ID3DX11ThreadPump 86 | 87 | DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown) 88 | { 89 | // IUnknown 90 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 91 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 92 | STDMETHOD_(ULONG, Release)(THIS) PURE; 93 | 94 | // ID3DX11ThreadPump 95 | STDMETHOD(AddWorkItem)(THIS_ ID3DX11DataLoader *pDataLoader, ID3DX11DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE; 96 | STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE; 97 | 98 | STDMETHOD(WaitForAllItems)(THIS) PURE; 99 | STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount); 100 | 101 | STDMETHOD(PurgeAllItems)(THIS) PURE; 102 | STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE; 103 | 104 | }; 105 | 106 | #ifdef __cplusplus 107 | extern "C" { 108 | #endif //__cplusplus 109 | 110 | HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump); 111 | 112 | HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext); 113 | 114 | #ifdef __cplusplus 115 | } 116 | #endif //__cplusplus 117 | 118 | /////////////////////////////////////////////////////////////////////////// 119 | 120 | #define _FACD3D 0x876 121 | #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) 122 | #define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code ) 123 | 124 | #define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) 125 | #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) 126 | 127 | #endif //__D3DX11CORE_H__ 128 | 129 | -------------------------------------------------------------------------------- /Include/d3dx9.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9.h 6 | // Content: D3DX utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX_INTERNAL__ 11 | #error Incorrect D3DX header used 12 | #endif 13 | 14 | #ifndef __D3DX9_H__ 15 | #define __D3DX9_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | 21 | #define D3DX_DEFAULT ((UINT) -1) 22 | #define D3DX_DEFAULT_NONPOW2 ((UINT) -2) 23 | #define D3DX_DEFAULT_FLOAT FLT_MAX 24 | #define D3DX_FROM_FILE ((UINT) -3) 25 | #define D3DFMT_FROM_FILE ((D3DFORMAT) -3) 26 | 27 | #ifndef D3DXINLINE 28 | #ifdef _MSC_VER 29 | #if (_MSC_VER >= 1200) 30 | #define D3DXINLINE __forceinline 31 | #else 32 | #define D3DXINLINE __inline 33 | #endif 34 | #else 35 | #ifdef __cplusplus 36 | #define D3DXINLINE inline 37 | #else 38 | #define D3DXINLINE 39 | #endif 40 | #endif 41 | #endif 42 | 43 | 44 | 45 | // Includes 46 | #include "d3d9.h" 47 | #include "d3dx9math.h" 48 | #include "d3dx9core.h" 49 | #include "d3dx9xof.h" 50 | #include "d3dx9mesh.h" 51 | #include "d3dx9shader.h" 52 | #include "d3dx9effect.h" 53 | 54 | #include "d3dx9tex.h" 55 | #include "d3dx9shape.h" 56 | #include "d3dx9anim.h" 57 | 58 | 59 | 60 | // Errors 61 | #define _FACDD 0x876 62 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 63 | 64 | enum _D3DXERR { 65 | D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900), 66 | D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901), 67 | D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902), 68 | D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903), 69 | D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904), 70 | D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905), 71 | D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906), 72 | D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907), 73 | D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908), 74 | }; 75 | 76 | 77 | #endif //__D3DX9_H__ 78 | 79 | -------------------------------------------------------------------------------- /Include/d3dx9shape.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9shapes.h 6 | // Content: D3DX simple shapes 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx9.h" 11 | 12 | #ifndef __D3DX9SHAPES_H__ 13 | #define __D3DX9SHAPES_H__ 14 | 15 | /////////////////////////////////////////////////////////////////////////// 16 | // Functions: 17 | /////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif //__cplusplus 22 | 23 | 24 | //------------------------------------------------------------------------- 25 | // D3DXCreatePolygon: 26 | // ------------------ 27 | // Creates a mesh containing an n-sided polygon. The polygon is centered 28 | // at the origin. 29 | // 30 | // Parameters: 31 | // 32 | // pDevice The D3D device with which the mesh is going to be used. 33 | // Length Length of each side. 34 | // Sides Number of sides the polygon has. (Must be >= 3) 35 | // ppMesh The mesh object which will be created 36 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 37 | //------------------------------------------------------------------------- 38 | HRESULT WINAPI 39 | D3DXCreatePolygon( 40 | LPDIRECT3DDEVICE9 pDevice, 41 | FLOAT Length, 42 | UINT Sides, 43 | LPD3DXMESH* ppMesh, 44 | LPD3DXBUFFER* ppAdjacency); 45 | 46 | 47 | //------------------------------------------------------------------------- 48 | // D3DXCreateBox: 49 | // -------------- 50 | // Creates a mesh containing an axis-aligned box. The box is centered at 51 | // the origin. 52 | // 53 | // Parameters: 54 | // 55 | // pDevice The D3D device with which the mesh is going to be used. 56 | // Width Width of box (along X-axis) 57 | // Height Height of box (along Y-axis) 58 | // Depth Depth of box (along Z-axis) 59 | // ppMesh The mesh object which will be created 60 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 61 | //------------------------------------------------------------------------- 62 | HRESULT WINAPI 63 | D3DXCreateBox( 64 | LPDIRECT3DDEVICE9 pDevice, 65 | FLOAT Width, 66 | FLOAT Height, 67 | FLOAT Depth, 68 | LPD3DXMESH* ppMesh, 69 | LPD3DXBUFFER* ppAdjacency); 70 | 71 | 72 | //------------------------------------------------------------------------- 73 | // D3DXCreateCylinder: 74 | // ------------------- 75 | // Creates a mesh containing a cylinder. The generated cylinder is 76 | // centered at the origin, and its axis is aligned with the Z-axis. 77 | // 78 | // Parameters: 79 | // 80 | // pDevice The D3D device with which the mesh is going to be used. 81 | // Radius1 Radius at -Z end (should be >= 0.0f) 82 | // Radius2 Radius at +Z end (should be >= 0.0f) 83 | // Length Length of cylinder (along Z-axis) 84 | // Slices Number of slices about the main axis 85 | // Stacks Number of stacks along the main axis 86 | // ppMesh The mesh object which will be created 87 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 88 | //------------------------------------------------------------------------- 89 | HRESULT WINAPI 90 | D3DXCreateCylinder( 91 | LPDIRECT3DDEVICE9 pDevice, 92 | FLOAT Radius1, 93 | FLOAT Radius2, 94 | FLOAT Length, 95 | UINT Slices, 96 | UINT Stacks, 97 | LPD3DXMESH* ppMesh, 98 | LPD3DXBUFFER* ppAdjacency); 99 | 100 | 101 | //------------------------------------------------------------------------- 102 | // D3DXCreateSphere: 103 | // ----------------- 104 | // Creates a mesh containing a sphere. The sphere is centered at the 105 | // origin. 106 | // 107 | // Parameters: 108 | // 109 | // pDevice The D3D device with which the mesh is going to be used. 110 | // Radius Radius of the sphere (should be >= 0.0f) 111 | // Slices Number of slices about the main axis 112 | // Stacks Number of stacks along the main axis 113 | // ppMesh The mesh object which will be created 114 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 115 | //------------------------------------------------------------------------- 116 | HRESULT WINAPI 117 | D3DXCreateSphere( 118 | LPDIRECT3DDEVICE9 pDevice, 119 | FLOAT Radius, 120 | UINT Slices, 121 | UINT Stacks, 122 | LPD3DXMESH* ppMesh, 123 | LPD3DXBUFFER* ppAdjacency); 124 | 125 | 126 | //------------------------------------------------------------------------- 127 | // D3DXCreateTorus: 128 | // ---------------- 129 | // Creates a mesh containing a torus. The generated torus is centered at 130 | // the origin, and its axis is aligned with the Z-axis. 131 | // 132 | // Parameters: 133 | // 134 | // pDevice The D3D device with which the mesh is going to be used. 135 | // InnerRadius Inner radius of the torus (should be >= 0.0f) 136 | // OuterRadius Outer radius of the torue (should be >= 0.0f) 137 | // Sides Number of sides in a cross-section (must be >= 3) 138 | // Rings Number of rings making up the torus (must be >= 3) 139 | // ppMesh The mesh object which will be created 140 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 141 | //------------------------------------------------------------------------- 142 | HRESULT WINAPI 143 | D3DXCreateTorus( 144 | LPDIRECT3DDEVICE9 pDevice, 145 | FLOAT InnerRadius, 146 | FLOAT OuterRadius, 147 | UINT Sides, 148 | UINT Rings, 149 | LPD3DXMESH* ppMesh, 150 | LPD3DXBUFFER* ppAdjacency); 151 | 152 | 153 | //------------------------------------------------------------------------- 154 | // D3DXCreateTeapot: 155 | // ----------------- 156 | // Creates a mesh containing a teapot. 157 | // 158 | // Parameters: 159 | // 160 | // pDevice The D3D device with which the mesh is going to be used. 161 | // ppMesh The mesh object which will be created 162 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 163 | //------------------------------------------------------------------------- 164 | HRESULT WINAPI 165 | D3DXCreateTeapot( 166 | LPDIRECT3DDEVICE9 pDevice, 167 | LPD3DXMESH* ppMesh, 168 | LPD3DXBUFFER* ppAdjacency); 169 | 170 | 171 | //------------------------------------------------------------------------- 172 | // D3DXCreateText: 173 | // --------------- 174 | // Creates a mesh containing the specified text using the font associated 175 | // with the device context. 176 | // 177 | // Parameters: 178 | // 179 | // pDevice The D3D device with which the mesh is going to be used. 180 | // hDC Device context, with desired font selected 181 | // pText Text to generate 182 | // Deviation Maximum chordal deviation from true font outlines 183 | // Extrusion Amount to extrude text in -Z direction 184 | // ppMesh The mesh object which will be created 185 | // pGlyphMetrics Address of buffer to receive glyph metric data (or NULL) 186 | //------------------------------------------------------------------------- 187 | HRESULT WINAPI 188 | D3DXCreateTextA( 189 | LPDIRECT3DDEVICE9 pDevice, 190 | HDC hDC, 191 | LPCSTR pText, 192 | FLOAT Deviation, 193 | FLOAT Extrusion, 194 | LPD3DXMESH* ppMesh, 195 | LPD3DXBUFFER* ppAdjacency, 196 | LPGLYPHMETRICSFLOAT pGlyphMetrics); 197 | 198 | HRESULT WINAPI 199 | D3DXCreateTextW( 200 | LPDIRECT3DDEVICE9 pDevice, 201 | HDC hDC, 202 | LPCWSTR pText, 203 | FLOAT Deviation, 204 | FLOAT Extrusion, 205 | LPD3DXMESH* ppMesh, 206 | LPD3DXBUFFER* ppAdjacency, 207 | LPGLYPHMETRICSFLOAT pGlyphMetrics); 208 | 209 | #ifdef UNICODE 210 | #define D3DXCreateText D3DXCreateTextW 211 | #else 212 | #define D3DXCreateText D3DXCreateTextA 213 | #endif 214 | 215 | 216 | #ifdef __cplusplus 217 | } 218 | #endif //__cplusplus 219 | 220 | #endif //__D3DX9SHAPES_H__ 221 | 222 | -------------------------------------------------------------------------------- /Include/d3dx9xof.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9xof.h 6 | // Content: D3DX .X File types and functions 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx9.h" 11 | 12 | #if !defined( __D3DX9XOF_H__ ) 13 | #define __D3DX9XOF_H__ 14 | 15 | #if defined( __cplusplus ) 16 | extern "C" { 17 | #endif // defined( __cplusplus ) 18 | 19 | //---------------------------------------------------------------------------- 20 | // D3DXF_FILEFORMAT 21 | // This flag is used to specify what file type to use when saving to disk. 22 | // _BINARY, and _TEXT are mutually exclusive, while 23 | // _COMPRESSED is an optional setting that works with all file types. 24 | //---------------------------------------------------------------------------- 25 | typedef DWORD D3DXF_FILEFORMAT; 26 | 27 | #define D3DXF_FILEFORMAT_BINARY 0 28 | #define D3DXF_FILEFORMAT_TEXT 1 29 | #define D3DXF_FILEFORMAT_COMPRESSED 2 30 | 31 | //---------------------------------------------------------------------------- 32 | // D3DXF_FILESAVEOPTIONS 33 | // This flag is used to specify where to save the file to. Each flag is 34 | // mutually exclusive, indicates the data location of the file, and also 35 | // chooses which additional data will specify the location. 36 | // _TOFILE is paired with a filename (LPCSTR) 37 | // _TOWFILE is paired with a filename (LPWSTR) 38 | //---------------------------------------------------------------------------- 39 | typedef DWORD D3DXF_FILESAVEOPTIONS; 40 | 41 | #define D3DXF_FILESAVE_TOFILE 0x00L 42 | #define D3DXF_FILESAVE_TOWFILE 0x01L 43 | 44 | //---------------------------------------------------------------------------- 45 | // D3DXF_FILELOADOPTIONS 46 | // This flag is used to specify where to load the file from. Each flag is 47 | // mutually exclusive, indicates the data location of the file, and also 48 | // chooses which additional data will specify the location. 49 | // _FROMFILE is paired with a filename (LPCSTR) 50 | // _FROMWFILE is paired with a filename (LPWSTR) 51 | // _FROMRESOURCE is paired with a (D3DXF_FILELOADRESOUCE*) description. 52 | // _FROMMEMORY is paired with a (D3DXF_FILELOADMEMORY*) description. 53 | //---------------------------------------------------------------------------- 54 | typedef DWORD D3DXF_FILELOADOPTIONS; 55 | 56 | #define D3DXF_FILELOAD_FROMFILE 0x00L 57 | #define D3DXF_FILELOAD_FROMWFILE 0x01L 58 | #define D3DXF_FILELOAD_FROMRESOURCE 0x02L 59 | #define D3DXF_FILELOAD_FROMMEMORY 0x03L 60 | 61 | //---------------------------------------------------------------------------- 62 | // D3DXF_FILELOADRESOURCE: 63 | //---------------------------------------------------------------------------- 64 | 65 | typedef struct _D3DXF_FILELOADRESOURCE 66 | { 67 | HMODULE hModule; // Desc 68 | LPCSTR lpName; // Desc 69 | LPCSTR lpType; // Desc 70 | } D3DXF_FILELOADRESOURCE; 71 | 72 | //---------------------------------------------------------------------------- 73 | // D3DXF_FILELOADMEMORY: 74 | //---------------------------------------------------------------------------- 75 | 76 | typedef struct _D3DXF_FILELOADMEMORY 77 | { 78 | LPCVOID lpMemory; // Desc 79 | SIZE_T dSize; // Desc 80 | } D3DXF_FILELOADMEMORY; 81 | 82 | #if defined( _WIN32 ) && !defined( _NO_COM ) 83 | 84 | // {cef08cf9-7b4f-4429-9624-2a690a933201} 85 | DEFINE_GUID( IID_ID3DXFile, 86 | 0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 87 | 88 | // {cef08cfa-7b4f-4429-9624-2a690a933201} 89 | DEFINE_GUID( IID_ID3DXFileSaveObject, 90 | 0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 91 | 92 | // {cef08cfb-7b4f-4429-9624-2a690a933201} 93 | DEFINE_GUID( IID_ID3DXFileSaveData, 94 | 0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 95 | 96 | // {cef08cfc-7b4f-4429-9624-2a690a933201} 97 | DEFINE_GUID( IID_ID3DXFileEnumObject, 98 | 0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 99 | 100 | // {cef08cfd-7b4f-4429-9624-2a690a933201} 101 | DEFINE_GUID( IID_ID3DXFileData, 102 | 0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 103 | 104 | #endif // defined( _WIN32 ) && !defined( _NO_COM ) 105 | 106 | #if defined( __cplusplus ) 107 | #if !defined( DECLSPEC_UUID ) 108 | #if _MSC_VER >= 1100 109 | #define DECLSPEC_UUID( x ) __declspec( uuid( x ) ) 110 | #else // !( _MSC_VER >= 1100 ) 111 | #define DECLSPEC_UUID( x ) 112 | #endif // !( _MSC_VER >= 1100 ) 113 | #endif // !defined( DECLSPEC_UUID ) 114 | 115 | interface DECLSPEC_UUID( "cef08cf9-7b4f-4429-9624-2a690a933201" ) 116 | ID3DXFile; 117 | interface DECLSPEC_UUID( "cef08cfa-7b4f-4429-9624-2a690a933201" ) 118 | ID3DXFileSaveObject; 119 | interface DECLSPEC_UUID( "cef08cfb-7b4f-4429-9624-2a690a933201" ) 120 | ID3DXFileSaveData; 121 | interface DECLSPEC_UUID( "cef08cfc-7b4f-4429-9624-2a690a933201" ) 122 | ID3DXFileEnumObject; 123 | interface DECLSPEC_UUID( "cef08cfd-7b4f-4429-9624-2a690a933201" ) 124 | ID3DXFileData; 125 | 126 | #if defined( _COM_SMARTPTR_TYPEDEF ) 127 | _COM_SMARTPTR_TYPEDEF( ID3DXFile, 128 | __uuidof( ID3DXFile ) ); 129 | _COM_SMARTPTR_TYPEDEF( ID3DXFileSaveObject, 130 | __uuidof( ID3DXFileSaveObject ) ); 131 | _COM_SMARTPTR_TYPEDEF( ID3DXFileSaveData, 132 | __uuidof( ID3DXFileSaveData ) ); 133 | _COM_SMARTPTR_TYPEDEF( ID3DXFileEnumObject, 134 | __uuidof( ID3DXFileEnumObject ) ); 135 | _COM_SMARTPTR_TYPEDEF( ID3DXFileData, 136 | __uuidof( ID3DXFileData ) ); 137 | #endif // defined( _COM_SMARTPTR_TYPEDEF ) 138 | #endif // defined( __cplusplus ) 139 | 140 | typedef interface ID3DXFile ID3DXFile; 141 | typedef interface ID3DXFileSaveObject ID3DXFileSaveObject; 142 | typedef interface ID3DXFileSaveData ID3DXFileSaveData; 143 | typedef interface ID3DXFileEnumObject ID3DXFileEnumObject; 144 | typedef interface ID3DXFileData ID3DXFileData; 145 | 146 | ////////////////////////////////////////////////////////////////////////////// 147 | // ID3DXFile ///////////////////////////////////////////////////////////////// 148 | ////////////////////////////////////////////////////////////////////////////// 149 | 150 | #undef INTERFACE 151 | #define INTERFACE ID3DXFile 152 | 153 | DECLARE_INTERFACE_( ID3DXFile, IUnknown ) 154 | { 155 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 156 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 157 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 158 | 159 | STDMETHOD( CreateEnumObject )( THIS_ LPCVOID, D3DXF_FILELOADOPTIONS, 160 | ID3DXFileEnumObject** ) PURE; 161 | STDMETHOD( CreateSaveObject )( THIS_ LPCVOID, D3DXF_FILESAVEOPTIONS, 162 | D3DXF_FILEFORMAT, ID3DXFileSaveObject** ) PURE; 163 | STDMETHOD( RegisterTemplates )( THIS_ LPCVOID, SIZE_T ) PURE; 164 | STDMETHOD( RegisterEnumTemplates )( THIS_ ID3DXFileEnumObject* ) PURE; 165 | }; 166 | 167 | ////////////////////////////////////////////////////////////////////////////// 168 | // ID3DXFileSaveObject /////////////////////////////////////////////////////// 169 | ////////////////////////////////////////////////////////////////////////////// 170 | 171 | #undef INTERFACE 172 | #define INTERFACE ID3DXFileSaveObject 173 | 174 | DECLARE_INTERFACE_( ID3DXFileSaveObject, IUnknown ) 175 | { 176 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 177 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 178 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 179 | 180 | STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE; 181 | STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*, 182 | SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE; 183 | STDMETHOD( Save )( THIS ) PURE; 184 | }; 185 | 186 | ////////////////////////////////////////////////////////////////////////////// 187 | // ID3DXFileSaveData ///////////////////////////////////////////////////////// 188 | ////////////////////////////////////////////////////////////////////////////// 189 | 190 | #undef INTERFACE 191 | #define INTERFACE ID3DXFileSaveData 192 | 193 | DECLARE_INTERFACE_( ID3DXFileSaveData, IUnknown ) 194 | { 195 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 196 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 197 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 198 | 199 | STDMETHOD( GetSave )( THIS_ ID3DXFileSaveObject** ) PURE; 200 | STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE; 201 | STDMETHOD( GetId )( THIS_ LPGUID ) PURE; 202 | STDMETHOD( GetType )( THIS_ GUID* ) PURE; 203 | STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*, 204 | SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE; 205 | STDMETHOD( AddDataReference )( THIS_ LPCSTR, CONST GUID* ) PURE; 206 | }; 207 | 208 | ////////////////////////////////////////////////////////////////////////////// 209 | // ID3DXFileEnumObject /////////////////////////////////////////////////////// 210 | ////////////////////////////////////////////////////////////////////////////// 211 | 212 | #undef INTERFACE 213 | #define INTERFACE ID3DXFileEnumObject 214 | 215 | DECLARE_INTERFACE_( ID3DXFileEnumObject, IUnknown ) 216 | { 217 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 218 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 219 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 220 | 221 | STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE; 222 | STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE; 223 | STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE; 224 | STDMETHOD( GetDataObjectById )( THIS_ REFGUID, ID3DXFileData** ) PURE; 225 | STDMETHOD( GetDataObjectByName )( THIS_ LPCSTR, ID3DXFileData** ) PURE; 226 | }; 227 | 228 | ////////////////////////////////////////////////////////////////////////////// 229 | // ID3DXFileData ///////////////////////////////////////////////////////////// 230 | ////////////////////////////////////////////////////////////////////////////// 231 | 232 | #undef INTERFACE 233 | #define INTERFACE ID3DXFileData 234 | 235 | DECLARE_INTERFACE_( ID3DXFileData, IUnknown ) 236 | { 237 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 238 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 239 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 240 | 241 | STDMETHOD( GetEnum )( THIS_ ID3DXFileEnumObject** ) PURE; 242 | STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE; 243 | STDMETHOD( GetId )( THIS_ LPGUID ) PURE; 244 | STDMETHOD( Lock )( THIS_ SIZE_T*, LPCVOID* ) PURE; 245 | STDMETHOD( Unlock )( THIS ) PURE; 246 | STDMETHOD( GetType )( THIS_ GUID* ) PURE; 247 | STDMETHOD_( BOOL, IsReference )( THIS ) PURE; 248 | STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE; 249 | STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE; 250 | }; 251 | 252 | STDAPI D3DXFileCreate( ID3DXFile** lplpDirectXFile ); 253 | 254 | /* 255 | * DirectX File errors. 256 | */ 257 | 258 | #define _FACD3DXF 0x876 259 | 260 | #define D3DXFERR_BADOBJECT MAKE_HRESULT( 1, _FACD3DXF, 900 ) 261 | #define D3DXFERR_BADVALUE MAKE_HRESULT( 1, _FACD3DXF, 901 ) 262 | #define D3DXFERR_BADTYPE MAKE_HRESULT( 1, _FACD3DXF, 902 ) 263 | #define D3DXFERR_NOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 903 ) 264 | #define D3DXFERR_NOTDONEYET MAKE_HRESULT( 1, _FACD3DXF, 904 ) 265 | #define D3DXFERR_FILENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 905 ) 266 | #define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 906 ) 267 | #define D3DXFERR_BADRESOURCE MAKE_HRESULT( 1, _FACD3DXF, 907 ) 268 | #define D3DXFERR_BADFILETYPE MAKE_HRESULT( 1, _FACD3DXF, 908 ) 269 | #define D3DXFERR_BADFILEVERSION MAKE_HRESULT( 1, _FACD3DXF, 909 ) 270 | #define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT( 1, _FACD3DXF, 910 ) 271 | #define D3DXFERR_BADFILE MAKE_HRESULT( 1, _FACD3DXF, 911 ) 272 | #define D3DXFERR_PARSEERROR MAKE_HRESULT( 1, _FACD3DXF, 912 ) 273 | #define D3DXFERR_BADARRAYSIZE MAKE_HRESULT( 1, _FACD3DXF, 913 ) 274 | #define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT( 1, _FACD3DXF, 914 ) 275 | #define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT( 1, _FACD3DXF, 915 ) 276 | #define D3DXFERR_NOMOREDATA MAKE_HRESULT( 1, _FACD3DXF, 916 ) 277 | #define D3DXFERR_BADCACHEFILE MAKE_HRESULT( 1, _FACD3DXF, 917 ) 278 | 279 | /* 280 | * DirectX File object types. 281 | */ 282 | 283 | #ifndef WIN_TYPES 284 | #define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype 285 | #endif 286 | 287 | WIN_TYPES(ID3DXFile, D3DXFILE); 288 | WIN_TYPES(ID3DXFileEnumObject, D3DXFILEENUMOBJECT); 289 | WIN_TYPES(ID3DXFileSaveObject, D3DXFILESAVEOBJECT); 290 | WIN_TYPES(ID3DXFileData, D3DXFILEDATA); 291 | WIN_TYPES(ID3DXFileSaveData, D3DXFILESAVEDATA); 292 | 293 | #if defined( __cplusplus ) 294 | } // extern "C" 295 | #endif // defined( __cplusplus ) 296 | 297 | #endif // !defined( __D3DX9XOF_H__ ) 298 | 299 | 300 | -------------------------------------------------------------------------------- /Include/dcommon.h: -------------------------------------------------------------------------------- 1 | //+-------------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // Abstract: 6 | // Public API definitions shared by DWrite, D2D, and DImage. 7 | // 8 | //---------------------------------------------------------------------------- 9 | #pragma once 10 | 11 | #ifndef DCOMMON_H_INCLUDED 12 | #define DCOMMON_H_INCLUDED 13 | 14 | #include 15 | 16 | #ifndef DX_DECLARE_INTERFACE 17 | #define DX_DECLARE_INTERFACE(x) DECLSPEC_UUID(x) DECLSPEC_NOVTABLE 18 | #endif 19 | 20 | #ifndef CHECKMETHOD 21 | #define CHECKMETHOD(method) virtual DECLSPEC_NOTHROW _Must_inspect_result_ HRESULT STDMETHODCALLTYPE method 22 | #endif 23 | 24 | #pragma warning(push) 25 | #pragma warning(disable:4201) // anonymous unions warning 26 | 27 | // 28 | // Forward declarations 29 | // 30 | struct IDXGISurface; 31 | 32 | /// 33 | /// The measuring method used for text layout. 34 | /// 35 | typedef enum DWRITE_MEASURING_MODE 36 | { 37 | /// 38 | /// Text is measured using glyph ideal metrics whose values are independent to the current display resolution. 39 | /// 40 | DWRITE_MEASURING_MODE_NATURAL, 41 | 42 | /// 43 | /// Text is measured using glyph display compatible metrics whose values tuned for the current display resolution. 44 | /// 45 | DWRITE_MEASURING_MODE_GDI_CLASSIC, 46 | 47 | /// 48 | // Text is measured using the same glyph display metrics as text measured by GDI using a font 49 | // created with CLEARTYPE_NATURAL_QUALITY. 50 | /// 51 | DWRITE_MEASURING_MODE_GDI_NATURAL 52 | 53 | } DWRITE_MEASURING_MODE; 54 | 55 | #if NTDDI_VERSION >= NTDDI_WIN10_RS1 56 | 57 | /// 58 | /// Fonts may contain multiple drawable data formats for glyphs. These flags specify which formats 59 | /// are supported in the font, either at a font-wide level or per glyph, and the app may use them 60 | /// to tell DWrite which formats to return when splitting a color glyph run. 61 | /// 62 | enum DWRITE_GLYPH_IMAGE_FORMATS 63 | { 64 | /// 65 | /// Indicates no data is available for this glyph. 66 | /// 67 | DWRITE_GLYPH_IMAGE_FORMATS_NONE = 0x00000000, 68 | 69 | /// 70 | /// The glyph has TrueType outlines. 71 | /// 72 | DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE = 0x00000001, 73 | 74 | /// 75 | /// The glyph has CFF outlines. 76 | /// 77 | DWRITE_GLYPH_IMAGE_FORMATS_CFF = 0x00000002, 78 | 79 | /// 80 | /// The glyph has multilayered COLR data. 81 | /// 82 | DWRITE_GLYPH_IMAGE_FORMATS_COLR = 0x00000004, 83 | 84 | /// 85 | /// The glyph has SVG outlines as standard XML. 86 | /// 87 | /// 88 | /// Fonts may store the content gzip'd rather than plain text, 89 | /// indicated by the first two bytes as gzip header {0x1F 0x8B}. 90 | /// 91 | DWRITE_GLYPH_IMAGE_FORMATS_SVG = 0x00000008, 92 | 93 | /// 94 | /// The glyph has PNG image data, with standard PNG IHDR. 95 | /// 96 | DWRITE_GLYPH_IMAGE_FORMATS_PNG = 0x00000010, 97 | 98 | /// 99 | /// The glyph has JPEG image data, with standard JIFF SOI header. 100 | /// 101 | DWRITE_GLYPH_IMAGE_FORMATS_JPEG = 0x00000020, 102 | 103 | /// 104 | /// The glyph has TIFF image data. 105 | /// 106 | DWRITE_GLYPH_IMAGE_FORMATS_TIFF = 0x00000040, 107 | 108 | /// 109 | /// The glyph has raw 32-bit premultiplied BGRA data. 110 | /// 111 | DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8 = 0x00000080, 112 | }; 113 | 114 | #ifdef DEFINE_ENUM_FLAG_OPERATORS 115 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS); 116 | #endif 117 | 118 | #endif 119 | 120 | /// 121 | /// Qualifies how alpha is to be treated in a bitmap or render target containing 122 | /// alpha. 123 | /// 124 | typedef enum D2D1_ALPHA_MODE 125 | { 126 | 127 | /// 128 | /// Alpha mode should be determined implicitly. Some target surfaces do not supply 129 | /// or imply this information in which case alpha must be specified. 130 | /// 131 | D2D1_ALPHA_MODE_UNKNOWN = 0, 132 | 133 | /// 134 | /// Treat the alpha as premultipled. 135 | /// 136 | D2D1_ALPHA_MODE_PREMULTIPLIED = 1, 137 | 138 | /// 139 | /// Opacity is in the 'A' component only. 140 | /// 141 | D2D1_ALPHA_MODE_STRAIGHT = 2, 142 | 143 | /// 144 | /// Ignore any alpha channel information. 145 | /// 146 | D2D1_ALPHA_MODE_IGNORE = 3, 147 | 148 | D2D1_ALPHA_MODE_FORCE_DWORD = 0xffffffff 149 | 150 | } D2D1_ALPHA_MODE; 151 | 152 | /// 153 | /// Description of a pixel format. 154 | /// 155 | typedef struct D2D1_PIXEL_FORMAT 156 | { 157 | DXGI_FORMAT format; 158 | D2D1_ALPHA_MODE alphaMode; 159 | 160 | } D2D1_PIXEL_FORMAT; 161 | 162 | /// 163 | /// Represents an x-coordinate and y-coordinate pair in two-dimensional space. 164 | /// 165 | typedef struct D2D_POINT_2U 166 | { 167 | UINT32 x; 168 | UINT32 y; 169 | 170 | } D2D_POINT_2U; 171 | 172 | /// 173 | /// Represents an x-coordinate and y-coordinate pair in two-dimensional space. 174 | /// 175 | typedef struct D2D_POINT_2F 176 | { 177 | FLOAT x; 178 | FLOAT y; 179 | 180 | } D2D_POINT_2F; 181 | 182 | typedef POINT D2D_POINT_2L; 183 | 184 | /// 185 | /// A vector of 2 FLOAT values (x, y). 186 | /// 187 | typedef struct D2D_VECTOR_2F 188 | { 189 | FLOAT x; 190 | FLOAT y; 191 | 192 | } D2D_VECTOR_2F; 193 | 194 | 195 | /// 196 | /// A vector of 3 FLOAT values (x, y, z). 197 | /// 198 | typedef struct D2D_VECTOR_3F 199 | { 200 | FLOAT x; 201 | FLOAT y; 202 | FLOAT z; 203 | 204 | } D2D_VECTOR_3F; 205 | 206 | 207 | /// 208 | /// A vector of 4 FLOAT values (x, y, z, w). 209 | /// 210 | typedef struct D2D_VECTOR_4F 211 | { 212 | FLOAT x; 213 | FLOAT y; 214 | FLOAT z; 215 | FLOAT w; 216 | 217 | } D2D_VECTOR_4F; 218 | 219 | 220 | /// 221 | /// Represents a rectangle defined by the coordinates of the upper-left corner 222 | /// (left, top) and the coordinates of the lower-right corner (right, bottom). 223 | /// 224 | typedef struct D2D_RECT_F 225 | { 226 | FLOAT left; 227 | FLOAT top; 228 | FLOAT right; 229 | FLOAT bottom; 230 | 231 | } D2D_RECT_F; 232 | 233 | 234 | /// 235 | /// Represents a rectangle defined by the coordinates of the upper-left corner 236 | /// (left, top) and the coordinates of the lower-right corner (right, bottom). 237 | /// 238 | typedef struct D2D_RECT_U 239 | { 240 | UINT32 left; 241 | UINT32 top; 242 | UINT32 right; 243 | UINT32 bottom; 244 | 245 | } D2D_RECT_U; 246 | 247 | typedef RECT D2D_RECT_L; 248 | 249 | /// 250 | /// Stores an ordered pair of floats, typically the width and height of a rectangle. 251 | /// 252 | typedef struct D2D_SIZE_F 253 | { 254 | FLOAT width; 255 | FLOAT height; 256 | 257 | } D2D_SIZE_F; 258 | 259 | 260 | /// 261 | /// Stores an ordered pair of integers, typically the width and height of a 262 | /// rectangle. 263 | /// 264 | typedef struct D2D_SIZE_U 265 | { 266 | UINT32 width; 267 | UINT32 height; 268 | 269 | } D2D_SIZE_U; 270 | 271 | 272 | /// 273 | /// Represents a 3-by-2 matrix. 274 | /// 275 | typedef struct D2D_MATRIX_3X2_F 276 | { 277 | union 278 | { 279 | struct 280 | { 281 | /// 282 | /// Horizontal scaling / cosine of rotation 283 | /// 284 | FLOAT m11; 285 | 286 | /// 287 | /// Vertical shear / sine of rotation 288 | /// 289 | FLOAT m12; 290 | 291 | /// 292 | /// Horizontal shear / negative sine of rotation 293 | /// 294 | FLOAT m21; 295 | 296 | /// 297 | /// Vertical scaling / cosine of rotation 298 | /// 299 | FLOAT m22; 300 | 301 | /// 302 | /// Horizontal shift (always orthogonal regardless of rotation) 303 | /// 304 | FLOAT dx; 305 | 306 | /// 307 | /// Vertical shift (always orthogonal regardless of rotation) 308 | /// 309 | FLOAT dy; 310 | }; 311 | 312 | struct 313 | { 314 | FLOAT _11, _12; 315 | FLOAT _21, _22; 316 | FLOAT _31, _32; 317 | }; 318 | 319 | FLOAT m[3][2]; 320 | }; 321 | 322 | } D2D_MATRIX_3X2_F; 323 | 324 | 325 | 326 | /// 327 | /// Represents a 4-by-3 matrix. 328 | /// 329 | typedef struct D2D_MATRIX_4X3_F 330 | { 331 | union 332 | { 333 | struct 334 | { 335 | FLOAT _11, _12, _13; 336 | FLOAT _21, _22, _23; 337 | FLOAT _31, _32, _33; 338 | FLOAT _41, _42, _43; 339 | }; 340 | 341 | FLOAT m[4][3]; 342 | }; 343 | 344 | } D2D_MATRIX_4X3_F; 345 | 346 | 347 | /// 348 | /// Represents a 4-by-4 matrix. 349 | /// 350 | typedef struct D2D_MATRIX_4X4_F 351 | { 352 | union 353 | { 354 | struct 355 | { 356 | FLOAT _11, _12, _13, _14; 357 | FLOAT _21, _22, _23, _24; 358 | FLOAT _31, _32, _33, _34; 359 | FLOAT _41, _42, _43, _44; 360 | }; 361 | 362 | FLOAT m[4][4]; 363 | }; 364 | 365 | } D2D_MATRIX_4X4_F; 366 | 367 | 368 | /// 369 | /// Represents a 5-by-4 matrix. 370 | /// 371 | typedef struct D2D_MATRIX_5X4_F 372 | { 373 | union 374 | { 375 | struct 376 | { 377 | FLOAT _11, _12, _13, _14; 378 | FLOAT _21, _22, _23, _24; 379 | FLOAT _31, _32, _33, _34; 380 | FLOAT _41, _42, _43, _44; 381 | FLOAT _51, _52, _53, _54; 382 | }; 383 | 384 | FLOAT m[5][4]; 385 | }; 386 | 387 | } D2D_MATRIX_5X4_F; 388 | 389 | 390 | typedef D2D_POINT_2F D2D1_POINT_2F; 391 | typedef D2D_POINT_2U D2D1_POINT_2U; 392 | typedef D2D_POINT_2L D2D1_POINT_2L; 393 | typedef D2D_RECT_F D2D1_RECT_F; 394 | typedef D2D_RECT_U D2D1_RECT_U; 395 | typedef D2D_RECT_L D2D1_RECT_L; 396 | typedef D2D_SIZE_F D2D1_SIZE_F; 397 | typedef D2D_SIZE_U D2D1_SIZE_U; 398 | typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F; 399 | 400 | 401 | #pragma warning(pop) 402 | 403 | #endif /* DCOMMON_H_INCLUDED */ 404 | -------------------------------------------------------------------------------- /Include/dcompanimation.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* @@MIDL_FILE_HEADING( ) */ 8 | 9 | #pragma warning( disable: 4049 ) /* more than 64k source lines */ 10 | 11 | 12 | /* verify that the version is high enough to compile this file*/ 13 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 14 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 15 | #endif 16 | 17 | /* verify that the version is high enough to compile this file*/ 18 | #ifndef __REQUIRED_RPCSAL_H_VERSION__ 19 | #define __REQUIRED_RPCSAL_H_VERSION__ 100 20 | #endif 21 | 22 | #include "rpc.h" 23 | #include "rpcndr.h" 24 | 25 | #ifndef __RPCNDR_H_VERSION__ 26 | #error this stub requires an updated version of 27 | #endif /* __RPCNDR_H_VERSION__ */ 28 | 29 | #ifndef COM_NO_WINDOWS_H 30 | #include "windows.h" 31 | #include "ole2.h" 32 | #endif /*COM_NO_WINDOWS_H*/ 33 | 34 | #ifndef __dcompanimation_h__ 35 | #define __dcompanimation_h__ 36 | 37 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 38 | #pragma once 39 | #endif 40 | 41 | /* Forward Declarations */ 42 | 43 | #ifndef __IDCompositionAnimation_FWD_DEFINED__ 44 | #define __IDCompositionAnimation_FWD_DEFINED__ 45 | typedef interface IDCompositionAnimation IDCompositionAnimation; 46 | 47 | #endif /* __IDCompositionAnimation_FWD_DEFINED__ */ 48 | 49 | 50 | /* header files for imported files */ 51 | #include "wtypes.h" 52 | #include "unknwn.h" 53 | 54 | #ifdef __cplusplus 55 | extern "C"{ 56 | #endif 57 | 58 | 59 | /* interface __MIDL_itf_dcompanimation_0000_0000 */ 60 | /* [local] */ 61 | 62 | //--------------------------------------------------------------------------- 63 | // Copyright (c) Microsoft Corporation. All rights reserved. 64 | // 65 | //--------------------------------------------------------------------------- 66 | 67 | 68 | extern RPC_IF_HANDLE __MIDL_itf_dcompanimation_0000_0000_v0_0_c_ifspec; 69 | extern RPC_IF_HANDLE __MIDL_itf_dcompanimation_0000_0000_v0_0_s_ifspec; 70 | 71 | #ifndef __IDCompositionAnimation_INTERFACE_DEFINED__ 72 | #define __IDCompositionAnimation_INTERFACE_DEFINED__ 73 | 74 | /* interface IDCompositionAnimation */ 75 | /* [unique][helpstring][uuid][object][local] */ 76 | 77 | 78 | EXTERN_C const IID IID_IDCompositionAnimation; 79 | 80 | #if defined(__cplusplus) && !defined(CINTERFACE) 81 | 82 | MIDL_INTERFACE("CBFD91D9-51B2-45e4-B3DE-D19CCFB863C5") 83 | IDCompositionAnimation : public IUnknown 84 | { 85 | public: 86 | virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; 87 | 88 | virtual HRESULT STDMETHODCALLTYPE SetAbsoluteBeginTime( 89 | LARGE_INTEGER beginTime) = 0; 90 | 91 | virtual HRESULT STDMETHODCALLTYPE AddCubic( 92 | double beginOffset, 93 | float constantCoefficient, 94 | float linearCoefficient, 95 | float quadraticCoefficient, 96 | float cubicCoefficient) = 0; 97 | 98 | virtual HRESULT STDMETHODCALLTYPE AddSinusoidal( 99 | double beginOffset, 100 | float bias, 101 | float amplitude, 102 | float frequency, 103 | float phase) = 0; 104 | 105 | virtual HRESULT STDMETHODCALLTYPE AddRepeat( 106 | double beginOffset, 107 | double durationToRepeat) = 0; 108 | 109 | virtual HRESULT STDMETHODCALLTYPE End( 110 | double endOffset, 111 | float endValue) = 0; 112 | 113 | }; 114 | 115 | 116 | #else /* C style interface */ 117 | 118 | typedef struct IDCompositionAnimationVtbl 119 | { 120 | BEGIN_INTERFACE 121 | 122 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 123 | IDCompositionAnimation * This, 124 | /* [in] */ REFIID riid, 125 | /* [annotation][iid_is][out] */ 126 | _COM_Outptr_ void **ppvObject); 127 | 128 | ULONG ( STDMETHODCALLTYPE *AddRef )( 129 | IDCompositionAnimation * This); 130 | 131 | ULONG ( STDMETHODCALLTYPE *Release )( 132 | IDCompositionAnimation * This); 133 | 134 | HRESULT ( STDMETHODCALLTYPE *Reset )( 135 | IDCompositionAnimation * This); 136 | 137 | HRESULT ( STDMETHODCALLTYPE *SetAbsoluteBeginTime )( 138 | IDCompositionAnimation * This, 139 | LARGE_INTEGER beginTime); 140 | 141 | HRESULT ( STDMETHODCALLTYPE *AddCubic )( 142 | IDCompositionAnimation * This, 143 | double beginOffset, 144 | float constantCoefficient, 145 | float linearCoefficient, 146 | float quadraticCoefficient, 147 | float cubicCoefficient); 148 | 149 | HRESULT ( STDMETHODCALLTYPE *AddSinusoidal )( 150 | IDCompositionAnimation * This, 151 | double beginOffset, 152 | float bias, 153 | float amplitude, 154 | float frequency, 155 | float phase); 156 | 157 | HRESULT ( STDMETHODCALLTYPE *AddRepeat )( 158 | IDCompositionAnimation * This, 159 | double beginOffset, 160 | double durationToRepeat); 161 | 162 | HRESULT ( STDMETHODCALLTYPE *End )( 163 | IDCompositionAnimation * This, 164 | double endOffset, 165 | float endValue); 166 | 167 | END_INTERFACE 168 | } IDCompositionAnimationVtbl; 169 | 170 | interface IDCompositionAnimation 171 | { 172 | CONST_VTBL struct IDCompositionAnimationVtbl *lpVtbl; 173 | }; 174 | 175 | 176 | 177 | #ifdef COBJMACROS 178 | 179 | 180 | #define IDCompositionAnimation_QueryInterface(This,riid,ppvObject) \ 181 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 182 | 183 | #define IDCompositionAnimation_AddRef(This) \ 184 | ( (This)->lpVtbl -> AddRef(This) ) 185 | 186 | #define IDCompositionAnimation_Release(This) \ 187 | ( (This)->lpVtbl -> Release(This) ) 188 | 189 | 190 | #define IDCompositionAnimation_Reset(This) \ 191 | ( (This)->lpVtbl -> Reset(This) ) 192 | 193 | #define IDCompositionAnimation_SetAbsoluteBeginTime(This,beginTime) \ 194 | ( (This)->lpVtbl -> SetAbsoluteBeginTime(This,beginTime) ) 195 | 196 | #define IDCompositionAnimation_AddCubic(This,beginOffset,constantCoefficient,linearCoefficient,quadraticCoefficient,cubicCoefficient) \ 197 | ( (This)->lpVtbl -> AddCubic(This,beginOffset,constantCoefficient,linearCoefficient,quadraticCoefficient,cubicCoefficient) ) 198 | 199 | #define IDCompositionAnimation_AddSinusoidal(This,beginOffset,bias,amplitude,frequency,phase) \ 200 | ( (This)->lpVtbl -> AddSinusoidal(This,beginOffset,bias,amplitude,frequency,phase) ) 201 | 202 | #define IDCompositionAnimation_AddRepeat(This,beginOffset,durationToRepeat) \ 203 | ( (This)->lpVtbl -> AddRepeat(This,beginOffset,durationToRepeat) ) 204 | 205 | #define IDCompositionAnimation_End(This,endOffset,endValue) \ 206 | ( (This)->lpVtbl -> End(This,endOffset,endValue) ) 207 | 208 | #endif /* COBJMACROS */ 209 | 210 | 211 | #endif /* C style interface */ 212 | 213 | 214 | 215 | 216 | #endif /* __IDCompositionAnimation_INTERFACE_DEFINED__ */ 217 | 218 | 219 | /* interface __MIDL_itf_dcompanimation_0000_0001 */ 220 | /* [local] */ 221 | 222 | 223 | 224 | extern RPC_IF_HANDLE __MIDL_itf_dcompanimation_0000_0001_v0_0_c_ifspec; 225 | extern RPC_IF_HANDLE __MIDL_itf_dcompanimation_0000_0001_v0_0_s_ifspec; 226 | 227 | /* Additional Prototypes for ALL interfaces */ 228 | 229 | /* end of Additional Prototypes */ 230 | 231 | #ifdef __cplusplus 232 | } 233 | #endif 234 | 235 | #endif 236 | 237 | 238 | -------------------------------------------------------------------------------- /Include/dcomptypes.h: -------------------------------------------------------------------------------- 1 | 2 | //--------------------------------------------------------------------------- 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | //--------------------------------------------------------------------------- 5 | #pragma once 6 | 7 | #include // for DXGI_RATIONAL 8 | #include // for DXGI_ALPHA_MODE, DXGI_HDR_METADATA_TYPE 9 | 10 | 11 | 12 | #if (NTDDI_VERSION >= NTDDI_WIN8) 13 | 14 | 15 | // 16 | // DirectComposition types 17 | // 18 | 19 | enum DCOMPOSITION_BITMAP_INTERPOLATION_MODE 20 | { 21 | DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0, 22 | DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR = 1, 23 | 24 | DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT = 0xffffffff 25 | }; 26 | 27 | enum DCOMPOSITION_BORDER_MODE 28 | { 29 | DCOMPOSITION_BORDER_MODE_SOFT = 0, 30 | DCOMPOSITION_BORDER_MODE_HARD = 1, 31 | 32 | DCOMPOSITION_BORDER_MODE_INHERIT = 0xffffffff 33 | }; 34 | 35 | enum DCOMPOSITION_COMPOSITE_MODE 36 | { 37 | DCOMPOSITION_COMPOSITE_MODE_SOURCE_OVER = 0, 38 | DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT = 1, 39 | #if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE) 40 | DCOMPOSITION_COMPOSITE_MODE_MIN_BLEND = 2, 41 | #endif // (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE) 42 | 43 | DCOMPOSITION_COMPOSITE_MODE_INHERIT = 0xffffffff 44 | }; 45 | 46 | #if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE) 47 | enum DCOMPOSITION_BACKFACE_VISIBILITY 48 | { 49 | DCOMPOSITION_BACKFACE_VISIBILITY_VISIBLE = 0, 50 | DCOMPOSITION_BACKFACE_VISIBILITY_HIDDEN = 1, 51 | 52 | DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT = 0xffffffff 53 | }; 54 | 55 | enum DCOMPOSITION_OPACITY_MODE 56 | { 57 | DCOMPOSITION_OPACITY_MODE_LAYER = 0, 58 | DCOMPOSITION_OPACITY_MODE_MULTIPLY = 1, 59 | 60 | DCOMPOSITION_OPACITY_MODE_INHERIT = 0xffffffff 61 | }; 62 | #endif // (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE) 63 | 64 | #if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD) 65 | enum DCOMPOSITION_DEPTH_MODE 66 | { 67 | DCOMPOSITION_DEPTH_MODE_TREE = 0, 68 | DCOMPOSITION_DEPTH_MODE_SPATIAL = 1, 69 | DCOMPOSITION_DEPTH_MODE_SORTED = 3, 70 | 71 | DCOMPOSITION_DEPTH_MODE_INHERIT = 0xffffffff 72 | }; 73 | #endif // (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD) 74 | 75 | typedef struct 76 | { 77 | LARGE_INTEGER lastFrameTime; 78 | DXGI_RATIONAL currentCompositionRate; 79 | LARGE_INTEGER currentTime; 80 | LARGE_INTEGER timeFrequency; 81 | LARGE_INTEGER nextEstimatedFrameTime; 82 | } DCOMPOSITION_FRAME_STATISTICS; 83 | 84 | 85 | // 86 | // Composition object specific access flags 87 | // 88 | 89 | #define COMPOSITIONOBJECT_READ 0x0001L 90 | #define COMPOSITIONOBJECT_WRITE 0x0002L 91 | 92 | #define COMPOSITIONOBJECT_ALL_ACCESS (COMPOSITIONOBJECT_READ | COMPOSITIONOBJECT_WRITE) 93 | 94 | #endif // NTDDI_WIN8 95 | 96 | 97 | -------------------------------------------------------------------------------- /Include/dxgicommon.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) Microsoft. All rights reserved. 3 | // 4 | 5 | #ifndef __dxgicommon_h__ 6 | #define __dxgicommon_h__ 7 | 8 | 9 | typedef struct DXGI_RATIONAL 10 | { 11 | UINT Numerator; 12 | UINT Denominator; 13 | } DXGI_RATIONAL; 14 | 15 | // The following values are used with DXGI_SAMPLE_DESC::Quality: 16 | #define DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN 0xffffffff 17 | #define DXGI_CENTER_MULTISAMPLE_QUALITY_PATTERN 0xfffffffe 18 | 19 | typedef struct DXGI_SAMPLE_DESC 20 | { 21 | UINT Count; 22 | UINT Quality; 23 | } DXGI_SAMPLE_DESC; 24 | 25 | typedef enum DXGI_COLOR_SPACE_TYPE 26 | { 27 | DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0, 28 | DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 1, 29 | DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 2, 30 | DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 3, 31 | DXGI_COLOR_SPACE_RESERVED = 4, 32 | DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 5, 33 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 6, 34 | DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 7, 35 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 8, 36 | DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 9, 37 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 10, 38 | DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 11, 39 | DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 = 12, 40 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 = 13, 41 | DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 = 14, 42 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15, 43 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16, 44 | DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 = 17, 45 | DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020 = 18, 46 | DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020 = 19, 47 | DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P709 = 20, 48 | DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P2020 = 21, 49 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P709 = 22, 50 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P2020 = 23, 51 | DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_TOPLEFT_P2020 = 24, 52 | DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF 53 | } DXGI_COLOR_SPACE_TYPE; 54 | 55 | #endif // __dxgicommon_h__ 56 | 57 | -------------------------------------------------------------------------------- /Include/dxgiformat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) Microsoft. All rights reserved. 3 | // 4 | 5 | #ifndef __dxgiformat_h__ 6 | #define __dxgiformat_h__ 7 | 8 | #define DXGI_FORMAT_DEFINED 1 9 | 10 | typedef enum DXGI_FORMAT 11 | { 12 | DXGI_FORMAT_UNKNOWN = 0, 13 | DXGI_FORMAT_R32G32B32A32_TYPELESS = 1, 14 | DXGI_FORMAT_R32G32B32A32_FLOAT = 2, 15 | DXGI_FORMAT_R32G32B32A32_UINT = 3, 16 | DXGI_FORMAT_R32G32B32A32_SINT = 4, 17 | DXGI_FORMAT_R32G32B32_TYPELESS = 5, 18 | DXGI_FORMAT_R32G32B32_FLOAT = 6, 19 | DXGI_FORMAT_R32G32B32_UINT = 7, 20 | DXGI_FORMAT_R32G32B32_SINT = 8, 21 | DXGI_FORMAT_R16G16B16A16_TYPELESS = 9, 22 | DXGI_FORMAT_R16G16B16A16_FLOAT = 10, 23 | DXGI_FORMAT_R16G16B16A16_UNORM = 11, 24 | DXGI_FORMAT_R16G16B16A16_UINT = 12, 25 | DXGI_FORMAT_R16G16B16A16_SNORM = 13, 26 | DXGI_FORMAT_R16G16B16A16_SINT = 14, 27 | DXGI_FORMAT_R32G32_TYPELESS = 15, 28 | DXGI_FORMAT_R32G32_FLOAT = 16, 29 | DXGI_FORMAT_R32G32_UINT = 17, 30 | DXGI_FORMAT_R32G32_SINT = 18, 31 | DXGI_FORMAT_R32G8X24_TYPELESS = 19, 32 | DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20, 33 | DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21, 34 | DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22, 35 | DXGI_FORMAT_R10G10B10A2_TYPELESS = 23, 36 | DXGI_FORMAT_R10G10B10A2_UNORM = 24, 37 | DXGI_FORMAT_R10G10B10A2_UINT = 25, 38 | DXGI_FORMAT_R11G11B10_FLOAT = 26, 39 | DXGI_FORMAT_R8G8B8A8_TYPELESS = 27, 40 | DXGI_FORMAT_R8G8B8A8_UNORM = 28, 41 | DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29, 42 | DXGI_FORMAT_R8G8B8A8_UINT = 30, 43 | DXGI_FORMAT_R8G8B8A8_SNORM = 31, 44 | DXGI_FORMAT_R8G8B8A8_SINT = 32, 45 | DXGI_FORMAT_R16G16_TYPELESS = 33, 46 | DXGI_FORMAT_R16G16_FLOAT = 34, 47 | DXGI_FORMAT_R16G16_UNORM = 35, 48 | DXGI_FORMAT_R16G16_UINT = 36, 49 | DXGI_FORMAT_R16G16_SNORM = 37, 50 | DXGI_FORMAT_R16G16_SINT = 38, 51 | DXGI_FORMAT_R32_TYPELESS = 39, 52 | DXGI_FORMAT_D32_FLOAT = 40, 53 | DXGI_FORMAT_R32_FLOAT = 41, 54 | DXGI_FORMAT_R32_UINT = 42, 55 | DXGI_FORMAT_R32_SINT = 43, 56 | DXGI_FORMAT_R24G8_TYPELESS = 44, 57 | DXGI_FORMAT_D24_UNORM_S8_UINT = 45, 58 | DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46, 59 | DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47, 60 | DXGI_FORMAT_R8G8_TYPELESS = 48, 61 | DXGI_FORMAT_R8G8_UNORM = 49, 62 | DXGI_FORMAT_R8G8_UINT = 50, 63 | DXGI_FORMAT_R8G8_SNORM = 51, 64 | DXGI_FORMAT_R8G8_SINT = 52, 65 | DXGI_FORMAT_R16_TYPELESS = 53, 66 | DXGI_FORMAT_R16_FLOAT = 54, 67 | DXGI_FORMAT_D16_UNORM = 55, 68 | DXGI_FORMAT_R16_UNORM = 56, 69 | DXGI_FORMAT_R16_UINT = 57, 70 | DXGI_FORMAT_R16_SNORM = 58, 71 | DXGI_FORMAT_R16_SINT = 59, 72 | DXGI_FORMAT_R8_TYPELESS = 60, 73 | DXGI_FORMAT_R8_UNORM = 61, 74 | DXGI_FORMAT_R8_UINT = 62, 75 | DXGI_FORMAT_R8_SNORM = 63, 76 | DXGI_FORMAT_R8_SINT = 64, 77 | DXGI_FORMAT_A8_UNORM = 65, 78 | DXGI_FORMAT_R1_UNORM = 66, 79 | DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67, 80 | DXGI_FORMAT_R8G8_B8G8_UNORM = 68, 81 | DXGI_FORMAT_G8R8_G8B8_UNORM = 69, 82 | DXGI_FORMAT_BC1_TYPELESS = 70, 83 | DXGI_FORMAT_BC1_UNORM = 71, 84 | DXGI_FORMAT_BC1_UNORM_SRGB = 72, 85 | DXGI_FORMAT_BC2_TYPELESS = 73, 86 | DXGI_FORMAT_BC2_UNORM = 74, 87 | DXGI_FORMAT_BC2_UNORM_SRGB = 75, 88 | DXGI_FORMAT_BC3_TYPELESS = 76, 89 | DXGI_FORMAT_BC3_UNORM = 77, 90 | DXGI_FORMAT_BC3_UNORM_SRGB = 78, 91 | DXGI_FORMAT_BC4_TYPELESS = 79, 92 | DXGI_FORMAT_BC4_UNORM = 80, 93 | DXGI_FORMAT_BC4_SNORM = 81, 94 | DXGI_FORMAT_BC5_TYPELESS = 82, 95 | DXGI_FORMAT_BC5_UNORM = 83, 96 | DXGI_FORMAT_BC5_SNORM = 84, 97 | DXGI_FORMAT_B5G6R5_UNORM = 85, 98 | DXGI_FORMAT_B5G5R5A1_UNORM = 86, 99 | DXGI_FORMAT_B8G8R8A8_UNORM = 87, 100 | DXGI_FORMAT_B8G8R8X8_UNORM = 88, 101 | DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89, 102 | DXGI_FORMAT_B8G8R8A8_TYPELESS = 90, 103 | DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91, 104 | DXGI_FORMAT_B8G8R8X8_TYPELESS = 92, 105 | DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93, 106 | DXGI_FORMAT_BC6H_TYPELESS = 94, 107 | DXGI_FORMAT_BC6H_UF16 = 95, 108 | DXGI_FORMAT_BC6H_SF16 = 96, 109 | DXGI_FORMAT_BC7_TYPELESS = 97, 110 | DXGI_FORMAT_BC7_UNORM = 98, 111 | DXGI_FORMAT_BC7_UNORM_SRGB = 99, 112 | DXGI_FORMAT_AYUV = 100, 113 | DXGI_FORMAT_Y410 = 101, 114 | DXGI_FORMAT_Y416 = 102, 115 | DXGI_FORMAT_NV12 = 103, 116 | DXGI_FORMAT_P010 = 104, 117 | DXGI_FORMAT_P016 = 105, 118 | DXGI_FORMAT_420_OPAQUE = 106, 119 | DXGI_FORMAT_YUY2 = 107, 120 | DXGI_FORMAT_Y210 = 108, 121 | DXGI_FORMAT_Y216 = 109, 122 | DXGI_FORMAT_NV11 = 110, 123 | DXGI_FORMAT_AI44 = 111, 124 | DXGI_FORMAT_IA44 = 112, 125 | DXGI_FORMAT_P8 = 113, 126 | DXGI_FORMAT_A8P8 = 114, 127 | DXGI_FORMAT_B4G4R4A4_UNORM = 115, 128 | 129 | DXGI_FORMAT_P208 = 130, 130 | DXGI_FORMAT_V208 = 131, 131 | DXGI_FORMAT_V408 = 132, 132 | 133 | 134 | DXGI_FORMAT_FORCE_UINT = 0xffffffff 135 | } DXGI_FORMAT; 136 | 137 | #endif // __dxgiformat_h__ 138 | -------------------------------------------------------------------------------- /Include/dxgitype.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) Microsoft. All rights reserved. 3 | // 4 | #ifndef __dxgitype_h__ 5 | #define __dxgitype_h__ 6 | 7 | #include "dxgicommon.h" 8 | #include "dxgiformat.h" 9 | 10 | #define _FACDXGI 0x87a 11 | #define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code) 12 | #define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) 13 | 14 | // DXGI error messages have moved to winerror.h 15 | 16 | #define DXGI_CPU_ACCESS_NONE ( 0 ) 17 | #define DXGI_CPU_ACCESS_DYNAMIC ( 1 ) 18 | #define DXGI_CPU_ACCESS_READ_WRITE ( 2 ) 19 | #define DXGI_CPU_ACCESS_SCRATCH ( 3 ) 20 | #define DXGI_CPU_ACCESS_FIELD 15 21 | 22 | 23 | typedef struct DXGI_RGB 24 | { 25 | float Red; 26 | float Green; 27 | float Blue; 28 | } DXGI_RGB; 29 | 30 | #ifndef D3DCOLORVALUE_DEFINED 31 | typedef struct _D3DCOLORVALUE { 32 | float r; 33 | float g; 34 | float b; 35 | float a; 36 | } D3DCOLORVALUE; 37 | 38 | #define D3DCOLORVALUE_DEFINED 39 | #endif 40 | 41 | typedef D3DCOLORVALUE DXGI_RGBA; 42 | 43 | typedef struct DXGI_GAMMA_CONTROL 44 | { 45 | DXGI_RGB Scale; 46 | DXGI_RGB Offset; 47 | DXGI_RGB GammaCurve[ 1025 ]; 48 | } DXGI_GAMMA_CONTROL; 49 | 50 | typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES 51 | { 52 | BOOL ScaleAndOffsetSupported; 53 | float MaxConvertedValue; 54 | float MinConvertedValue; 55 | UINT NumGammaControlPoints; 56 | float ControlPointPositions[1025]; 57 | } DXGI_GAMMA_CONTROL_CAPABILITIES; 58 | 59 | typedef enum DXGI_MODE_SCANLINE_ORDER 60 | { 61 | DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, 62 | DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, 63 | DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, 64 | DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3 65 | } DXGI_MODE_SCANLINE_ORDER; 66 | 67 | typedef enum DXGI_MODE_SCALING 68 | { 69 | DXGI_MODE_SCALING_UNSPECIFIED = 0, 70 | DXGI_MODE_SCALING_CENTERED = 1, 71 | DXGI_MODE_SCALING_STRETCHED = 2 72 | } DXGI_MODE_SCALING; 73 | 74 | typedef enum DXGI_MODE_ROTATION 75 | { 76 | DXGI_MODE_ROTATION_UNSPECIFIED = 0, 77 | DXGI_MODE_ROTATION_IDENTITY = 1, 78 | DXGI_MODE_ROTATION_ROTATE90 = 2, 79 | DXGI_MODE_ROTATION_ROTATE180 = 3, 80 | DXGI_MODE_ROTATION_ROTATE270 = 4 81 | } DXGI_MODE_ROTATION; 82 | 83 | typedef struct DXGI_MODE_DESC 84 | { 85 | UINT Width; 86 | UINT Height; 87 | DXGI_RATIONAL RefreshRate; 88 | DXGI_FORMAT Format; 89 | DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; 90 | DXGI_MODE_SCALING Scaling; 91 | } DXGI_MODE_DESC; 92 | 93 | typedef struct DXGI_JPEG_DC_HUFFMAN_TABLE 94 | { 95 | BYTE CodeCounts[12]; 96 | BYTE CodeValues[12]; 97 | } DXGI_JPEG_DC_HUFFMAN_TABLE; 98 | 99 | typedef struct DXGI_JPEG_AC_HUFFMAN_TABLE 100 | { 101 | BYTE CodeCounts[16]; 102 | BYTE CodeValues[162]; 103 | } DXGI_JPEG_AC_HUFFMAN_TABLE; 104 | 105 | typedef struct DXGI_JPEG_QUANTIZATION_TABLE 106 | { 107 | BYTE Elements[64]; 108 | } DXGI_JPEG_QUANTIZATION_TABLE; 109 | 110 | #endif // __dxgitype_h__ 111 | 112 | -------------------------------------------------------------------------------- /Lib/.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.lib 3 | -------------------------------------------------------------------------------- /Lib/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(MAKE) -C x86 $@ 3 | $(MAKE) -C x64 $@ 4 | -------------------------------------------------------------------------------- /Lib/x64/Makefile: -------------------------------------------------------------------------------- 1 | DLLTOOL = x86_64-w64-mingw32-dlltool 2 | 3 | all: \ 4 | $(patsubst %.def,lib%.a,$(wildcard *.def)) 5 | 6 | lib%.a: %.def 7 | $(DLLTOOL) --def $< --output-lib $@ 8 | -------------------------------------------------------------------------------- /Lib/x64/d3d10.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d10.dll" 2 | EXPORTS 3 | D3D10CompileEffectFromMemory 4 | D3D10CompileShader 5 | D3D10CreateBlob 6 | D3D10CreateDevice 7 | D3D10CreateDeviceAndSwapChain 8 | D3D10CreateEffectFromMemory 9 | D3D10CreateEffectPoolFromMemory 10 | D3D10CreateStateBlock 11 | D3D10DisassembleEffect 12 | D3D10DisassembleShader 13 | D3D10GetGeometryShaderProfile 14 | D3D10GetInputAndOutputSignatureBlob 15 | D3D10GetInputSignatureBlob 16 | D3D10GetOutputSignatureBlob 17 | D3D10GetPixelShaderProfile 18 | D3D10GetShaderDebugInfo 19 | D3D10GetVersion 20 | D3D10GetVertexShaderProfile 21 | D3D10PreprocessShader 22 | D3D10ReflectShader 23 | D3D10RegisterLayers 24 | D3D10StateBlockMaskDifference 25 | D3D10StateBlockMaskDisableAll 26 | D3D10StateBlockMaskDisableCapture 27 | D3D10StateBlockMaskEnableAll 28 | D3D10StateBlockMaskEnableCapture 29 | D3D10StateBlockMaskGetSetting 30 | D3D10StateBlockMaskIntersect 31 | D3D10StateBlockMaskUnion 32 | -------------------------------------------------------------------------------- /Lib/x64/d3d10_1.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d10_1.dll" 2 | EXPORTS 3 | D3D10CompileEffectFromMemory 4 | D3D10CompileShader 5 | D3D10CreateBlob 6 | D3D10CreateDevice1 7 | D3D10CreateDeviceAndSwapChain1 8 | D3D10CreateEffectFromMemory 9 | D3D10CreateEffectPoolFromMemory 10 | D3D10CreateStateBlock 11 | D3D10DisassembleEffect 12 | D3D10DisassembleShader 13 | D3D10GetGeometryShaderProfile 14 | D3D10GetInputAndOutputSignatureBlob 15 | D3D10GetInputSignatureBlob 16 | D3D10GetOutputSignatureBlob 17 | D3D10GetPixelShaderProfile 18 | D3D10GetShaderDebugInfo 19 | D3D10GetVersion 20 | D3D10GetVertexShaderProfile 21 | D3D10PreprocessShader 22 | D3D10ReflectShader 23 | D3D10RegisterLayers 24 | D3D10StateBlockMaskDifference 25 | D3D10StateBlockMaskDisableAll 26 | D3D10StateBlockMaskDisableCapture 27 | D3D10StateBlockMaskEnableAll 28 | D3D10StateBlockMaskEnableCapture 29 | D3D10StateBlockMaskGetSetting 30 | D3D10StateBlockMaskIntersect 31 | D3D10StateBlockMaskUnion 32 | -------------------------------------------------------------------------------- /Lib/x64/d3d11.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d11.dll" 2 | EXPORTS 3 | D3DKMTCloseAdapter 4 | D3DKMTDestroyAllocation 5 | D3DKMTDestroyContext 6 | D3DKMTDestroyDevice 7 | D3DKMTDestroySynchronizationObject 8 | D3DKMTQueryAdapterInfo 9 | D3DKMTSetDisplayPrivateDriverFormat 10 | D3DKMTSignalSynchronizationObject 11 | D3DKMTUnlock 12 | D3DKMTWaitForSynchronizationObject 13 | OpenAdapter10 14 | OpenAdapter10_2 15 | D3D11CoreCreateDevice 16 | D3D11CoreCreateLayeredDevice 17 | D3D11CoreGetLayeredDeviceSize 18 | D3D11CoreRegisterLayers 19 | D3D11CreateDevice 20 | D3D11CreateDeviceAndSwapChain 21 | D3DKMTCreateAllocation 22 | D3DKMTCreateContext 23 | D3DKMTCreateDevice 24 | D3DKMTCreateSynchronizationObject 25 | D3DKMTEscape 26 | D3DKMTGetContextSchedulingPriority 27 | D3DKMTGetDeviceState 28 | D3DKMTGetDisplayModeList 29 | D3DKMTGetMultisampleMethodList 30 | D3DKMTGetRuntimeData 31 | D3DKMTGetSharedPrimaryHandle 32 | D3DKMTLock 33 | D3DKMTOpenAdapterFromHdc 34 | D3DKMTOpenResource 35 | D3DKMTPresent 36 | D3DKMTQueryAllocationResidency 37 | D3DKMTQueryResourceInfo 38 | D3DKMTRender 39 | D3DKMTSetAllocationPriority 40 | D3DKMTSetContextSchedulingPriority 41 | D3DKMTSetDisplayMode 42 | D3DKMTSetGammaRamp 43 | D3DKMTSetVidPnSourceOwner 44 | D3DKMTWaitForVerticalBlankEvent 45 | -------------------------------------------------------------------------------- /Lib/x64/d3d9.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d9.dll" 2 | EXPORTS 3 | Direct3DShaderValidatorCreate9@@YGPAUIDirect3DShaderValidator9@@XZ 4 | PSGPError@@YGXPAVD3DFE_PROCESSVERTICES@@W4PSGPERRORID@@I@Z 5 | PSGPSampleTexture@@YGXPAVD3DFE_PROCESSVERTICES@@IQAY03MI1@Z 6 | D3DPERF_BeginEvent 7 | D3DPERF_EndEvent 8 | D3DPERF_GetStatus 9 | D3DPERF_QueryRepeatFrame 10 | D3DPERF_SetMarker 11 | D3DPERF_SetOptions 12 | D3DPERF_SetRegion 13 | DebugSetLevel 14 | DebugSetMute 15 | Direct3DCreate9 16 | Direct3DCreate9Ex 17 | -------------------------------------------------------------------------------- /Lib/x64/d3dx10.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3dx10_35.dll" 2 | EXPORTS 3 | D3DX10CreateThreadPump@@YGJIIPAPAUID3DX10ThreadPump@@@Z 4 | D3DX10CheckVersion 5 | D3DX10CompileFromFileA 6 | D3DX10CompileFromFileW 7 | D3DX10CompileFromMemory 8 | D3DX10CompileFromResourceA 9 | D3DX10CompileFromResourceW 10 | D3DX10ComputeNormalMap 11 | D3DX10CreateAsyncCompilerProcessor 12 | D3DX10CreateAsyncEffectCreateProcessor 13 | D3DX10CreateAsyncEffectPoolCreateProcessor 14 | D3DX10CreateAsyncFileLoaderA 15 | D3DX10CreateAsyncFileLoaderW 16 | D3DX10CreateAsyncMemoryLoader 17 | D3DX10CreateAsyncResourceLoaderA 18 | D3DX10CreateAsyncResourceLoaderW 19 | D3DX10CreateAsyncShaderPreprocessProcessor 20 | D3DX10CreateAsyncShaderResourceViewProcessor 21 | D3DX10CreateAsyncTextureInfoProcessor 22 | D3DX10CreateAsyncTextureProcessor 23 | D3DX10CreateDevice 24 | D3DX10CreateDeviceAndSwapChain 25 | D3DX10CreateEffectFromFileA 26 | D3DX10CreateEffectFromFileW 27 | D3DX10CreateEffectFromMemory 28 | D3DX10CreateEffectFromResourceA 29 | D3DX10CreateEffectFromResourceW 30 | D3DX10CreateEffectPoolFromFileA 31 | D3DX10CreateEffectPoolFromFileW 32 | D3DX10CreateEffectPoolFromMemory 33 | D3DX10CreateEffectPoolFromResourceA 34 | D3DX10CreateEffectPoolFromResourceW 35 | D3DX10CreateFontA 36 | D3DX10CreateFontIndirectA 37 | D3DX10CreateFontIndirectW 38 | D3DX10CreateFontW 39 | D3DX10CreateMesh 40 | D3DX10CreateShaderResourceViewFromFileA 41 | D3DX10CreateShaderResourceViewFromFileW 42 | D3DX10CreateShaderResourceViewFromMemory 43 | D3DX10CreateShaderResourceViewFromResourceA 44 | D3DX10CreateShaderResourceViewFromResourceW 45 | D3DX10CreateSkinInfo 46 | D3DX10CreateSprite 47 | D3DX10CreateTextureFromFileA 48 | D3DX10CreateTextureFromFileW 49 | D3DX10CreateTextureFromMemory 50 | D3DX10CreateTextureFromResourceA 51 | D3DX10CreateTextureFromResourceW 52 | D3DX10DisassembleEffect 53 | D3DX10DisassembleShader 54 | D3DX10FilterTexture 55 | D3DX10GetDriverLevel 56 | D3DX10GetFeatureLevel1 57 | D3DX10GetImageInfoFromFileA 58 | D3DX10GetImageInfoFromFileW 59 | D3DX10GetImageInfoFromMemory 60 | D3DX10GetImageInfoFromResourceA 61 | D3DX10GetImageInfoFromResourceW 62 | D3DX10LoadTextureFromTexture 63 | D3DX10PreprocessShaderFromFileA 64 | D3DX10PreprocessShaderFromFileW 65 | D3DX10PreprocessShaderFromMemory 66 | D3DX10PreprocessShaderFromResourceA 67 | D3DX10PreprocessShaderFromResourceW 68 | D3DX10ReflectShader 69 | D3DX10SHProjectCubeMap 70 | D3DX10SaveTextureToFileA 71 | D3DX10SaveTextureToFileW 72 | D3DX10SaveTextureToMemory 73 | D3DX10UnsetAllDeviceObjects 74 | D3DXBoxBoundProbe 75 | D3DXColorAdjustContrast 76 | D3DXColorAdjustSaturation 77 | D3DXComputeBoundingBox 78 | D3DXComputeBoundingSphere 79 | D3DXCpuOptimizations 80 | D3DXCreateMatrixStack 81 | D3DXFloat16To32Array 82 | D3DXFloat32To16Array 83 | D3DXFresnelTerm 84 | D3DXIntersectTri 85 | D3DXMatrixAffineTransformation2D 86 | D3DXMatrixAffineTransformation 87 | D3DXMatrixDecompose 88 | D3DXMatrixDeterminant 89 | D3DXMatrixInverse 90 | D3DXMatrixLookAtLH 91 | D3DXMatrixLookAtRH 92 | D3DXMatrixMultiply 93 | D3DXMatrixMultiplyTranspose 94 | D3DXMatrixOrthoLH 95 | D3DXMatrixOrthoOffCenterLH 96 | D3DXMatrixOrthoOffCenterRH 97 | D3DXMatrixOrthoRH 98 | D3DXMatrixPerspectiveFovLH 99 | D3DXMatrixPerspectiveFovRH 100 | D3DXMatrixPerspectiveLH 101 | D3DXMatrixPerspectiveOffCenterLH 102 | D3DXMatrixPerspectiveOffCenterRH 103 | D3DXMatrixPerspectiveRH 104 | D3DXMatrixReflect 105 | D3DXMatrixRotationAxis 106 | D3DXMatrixRotationQuaternion 107 | D3DXMatrixRotationX 108 | D3DXMatrixRotationY 109 | D3DXMatrixRotationYawPitchRoll 110 | D3DXMatrixRotationZ 111 | D3DXMatrixScaling 112 | D3DXMatrixShadow 113 | D3DXMatrixTransformation2D 114 | D3DXMatrixTransformation 115 | D3DXMatrixTranslation 116 | D3DXMatrixTranspose 117 | D3DXPlaneFromPointNormal 118 | D3DXPlaneFromPoints 119 | D3DXPlaneIntersectLine 120 | D3DXPlaneNormalize 121 | D3DXPlaneTransform 122 | D3DXPlaneTransformArray 123 | D3DXQuaternionBaryCentric 124 | D3DXQuaternionExp 125 | D3DXQuaternionInverse 126 | D3DXQuaternionLn 127 | D3DXQuaternionMultiply 128 | D3DXQuaternionNormalize 129 | D3DXQuaternionRotationAxis 130 | D3DXQuaternionRotationMatrix 131 | D3DXQuaternionRotationYawPitchRoll 132 | D3DXQuaternionSlerp 133 | D3DXQuaternionSquad 134 | D3DXQuaternionSquadSetup 135 | D3DXQuaternionToAxisAngle 136 | D3DXSHAdd 137 | D3DXSHDot 138 | D3DXSHEvalConeLight 139 | D3DXSHEvalDirection 140 | D3DXSHEvalDirectionalLight 141 | D3DXSHEvalHemisphereLight 142 | D3DXSHEvalSphericalLight 143 | D3DXSHMultiply2 144 | D3DXSHMultiply3 145 | D3DXSHMultiply4 146 | D3DXSHMultiply5 147 | D3DXSHMultiply6 148 | D3DXSHRotate 149 | D3DXSHRotateZ 150 | D3DXSHScale 151 | D3DXSphereBoundProbe 152 | D3DXVec2BaryCentric 153 | D3DXVec2CatmullRom 154 | D3DXVec2Hermite 155 | D3DXVec2Normalize 156 | D3DXVec2Transform 157 | D3DXVec2TransformArray 158 | D3DXVec2TransformCoord 159 | D3DXVec2TransformCoordArray 160 | D3DXVec2TransformNormal 161 | D3DXVec2TransformNormalArray 162 | D3DXVec3BaryCentric 163 | D3DXVec3CatmullRom 164 | D3DXVec3Hermite 165 | D3DXVec3Normalize 166 | D3DXVec3Project 167 | D3DXVec3ProjectArray 168 | D3DXVec3Transform 169 | D3DXVec3TransformArray 170 | D3DXVec3TransformCoord 171 | D3DXVec3TransformCoordArray 172 | D3DXVec3TransformNormal 173 | D3DXVec3TransformNormalArray 174 | D3DXVec3Unproject 175 | D3DXVec3UnprojectArray 176 | D3DXVec4BaryCentric 177 | D3DXVec4CatmullRom 178 | D3DXVec4Cross 179 | D3DXVec4Hermite 180 | D3DXVec4Normalize 181 | D3DXVec4Transform 182 | D3DXVec4TransformArray 183 | -------------------------------------------------------------------------------- /Lib/x64/d3dx9.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3dx9_35.dll" 2 | EXPORTS 3 | D3DXAssembleShader 4 | D3DXAssembleShaderFromFileA 5 | D3DXAssembleShaderFromFileW 6 | D3DXAssembleShaderFromResourceA 7 | D3DXAssembleShaderFromResourceW 8 | D3DXBoxBoundProbe 9 | D3DXCheckCubeTextureRequirements 10 | D3DXCheckTextureRequirements 11 | D3DXCheckVersion 12 | D3DXCheckVolumeTextureRequirements 13 | D3DXCleanMesh 14 | D3DXColorAdjustContrast 15 | D3DXColorAdjustSaturation 16 | D3DXCompileShader 17 | D3DXCompileShaderFromFileA 18 | D3DXCompileShaderFromFileW 19 | D3DXCompileShaderFromResourceA 20 | D3DXCompileShaderFromResourceW 21 | D3DXComputeBoundingBox 22 | D3DXComputeBoundingSphere 23 | D3DXComputeIMTFromPerTexelSignal 24 | D3DXComputeIMTFromPerVertexSignal 25 | D3DXComputeIMTFromSignal 26 | D3DXComputeIMTFromTexture 27 | D3DXComputeNormalMap 28 | D3DXComputeNormals 29 | D3DXComputeTangent 30 | D3DXComputeTangentFrame 31 | D3DXComputeTangentFrameEx 32 | D3DXConcatenateMeshes 33 | D3DXConvertMeshSubsetToSingleStrip 34 | D3DXConvertMeshSubsetToStrips 35 | D3DXCreateAnimationController 36 | D3DXCreateBox 37 | D3DXCreateBuffer 38 | D3DXCreateCompressedAnimationSet 39 | D3DXCreateCubeTexture 40 | D3DXCreateCubeTextureFromFileA 41 | D3DXCreateCubeTextureFromFileExA 42 | D3DXCreateCubeTextureFromFileExW 43 | D3DXCreateCubeTextureFromFileInMemory 44 | D3DXCreateCubeTextureFromFileInMemoryEx 45 | D3DXCreateCubeTextureFromFileW 46 | D3DXCreateCubeTextureFromResourceA 47 | D3DXCreateCubeTextureFromResourceExA 48 | D3DXCreateCubeTextureFromResourceExW 49 | D3DXCreateCubeTextureFromResourceW 50 | D3DXCreateCylinder 51 | D3DXCreateEffect 52 | D3DXCreateEffectCompiler 53 | D3DXCreateEffectCompilerFromFileA 54 | D3DXCreateEffectCompilerFromFileW 55 | D3DXCreateEffectCompilerFromResourceA 56 | D3DXCreateEffectCompilerFromResourceW 57 | D3DXCreateEffectEx 58 | D3DXCreateEffectFromFileA 59 | D3DXCreateEffectFromFileExA 60 | D3DXCreateEffectFromFileExW 61 | D3DXCreateEffectFromFileW 62 | D3DXCreateEffectFromResourceA 63 | D3DXCreateEffectFromResourceExA 64 | D3DXCreateEffectFromResourceExW 65 | D3DXCreateEffectFromResourceW 66 | D3DXCreateEffectPool 67 | D3DXCreateFontA 68 | D3DXCreateFontIndirectA 69 | D3DXCreateFontIndirectW 70 | D3DXCreateFontW 71 | D3DXCreateFragmentLinker 72 | D3DXCreateKeyframedAnimationSet 73 | D3DXCreateLine 74 | D3DXCreateMatrixStack 75 | D3DXCreateMesh 76 | D3DXCreateMeshFVF 77 | D3DXCreateNPatchMesh 78 | D3DXCreatePMeshFromStream 79 | D3DXCreatePRTBuffer 80 | D3DXCreatePRTBufferTex 81 | D3DXCreatePRTCompBuffer 82 | D3DXCreatePRTEngine 83 | D3DXCreatePatchMesh 84 | D3DXCreatePolygon 85 | D3DXCreateRenderToEnvMap 86 | D3DXCreateRenderToSurface 87 | D3DXCreateSPMesh 88 | D3DXCreateSkinInfo 89 | D3DXCreateSkinInfoFVF 90 | D3DXCreateSkinInfoFromBlendedMesh 91 | D3DXCreateSphere 92 | D3DXCreateSprite 93 | D3DXCreateTeapot 94 | D3DXCreateTextA 95 | D3DXCreateTextW 96 | D3DXCreateTexture 97 | D3DXCreateTextureFromFileA 98 | D3DXCreateTextureFromFileExA 99 | D3DXCreateTextureFromFileExW 100 | D3DXCreateTextureFromFileInMemory 101 | D3DXCreateTextureFromFileInMemoryEx 102 | D3DXCreateTextureFromFileW 103 | D3DXCreateTextureFromResourceA 104 | D3DXCreateTextureFromResourceExA 105 | D3DXCreateTextureFromResourceExW 106 | D3DXCreateTextureFromResourceW 107 | D3DXCreateTextureGutterHelper 108 | D3DXCreateTextureShader 109 | D3DXCreateTorus 110 | D3DXCreateVolumeTexture 111 | D3DXCreateVolumeTextureFromFileA 112 | D3DXCreateVolumeTextureFromFileExA 113 | D3DXCreateVolumeTextureFromFileExW 114 | D3DXCreateVolumeTextureFromFileInMemory 115 | D3DXCreateVolumeTextureFromFileInMemoryEx 116 | D3DXCreateVolumeTextureFromFileW 117 | D3DXCreateVolumeTextureFromResourceA 118 | D3DXCreateVolumeTextureFromResourceExA 119 | D3DXCreateVolumeTextureFromResourceExW 120 | D3DXCreateVolumeTextureFromResourceW 121 | D3DXDebugMute 122 | D3DXDeclaratorFromFVF 123 | D3DXDisassembleEffect 124 | D3DXDisassembleShader 125 | D3DXFVFFromDeclarator 126 | D3DXFileCreate 127 | D3DXFillCubeTexture 128 | D3DXFillCubeTextureTX 129 | D3DXFillTexture 130 | D3DXFillTextureTX 131 | D3DXFillVolumeTexture 132 | D3DXFillVolumeTextureTX 133 | D3DXFilterTexture 134 | D3DXFindShaderComment 135 | D3DXFloat16To32Array 136 | D3DXFloat32To16Array 137 | D3DXFrameAppendChild 138 | D3DXFrameCalculateBoundingSphere 139 | D3DXFrameDestroy 140 | D3DXFrameFind 141 | D3DXFrameNumNamedMatrices 142 | D3DXFrameRegisterNamedMatrices 143 | D3DXFresnelTerm 144 | D3DXGatherFragments 145 | D3DXGatherFragmentsFromFileA 146 | D3DXGatherFragmentsFromFileW 147 | D3DXGatherFragmentsFromResourceA 148 | D3DXGatherFragmentsFromResourceW 149 | D3DXGenerateOutputDecl 150 | D3DXGeneratePMesh 151 | D3DXGetDeclLength 152 | D3DXGetDeclVertexSize 153 | D3DXGetDriverLevel 154 | D3DXGetFVFVertexSize 155 | D3DXGetImageInfoFromFileA 156 | D3DXGetImageInfoFromFileInMemory 157 | D3DXGetImageInfoFromFileW 158 | D3DXGetImageInfoFromResourceA 159 | D3DXGetImageInfoFromResourceW 160 | D3DXGetPixelShaderProfile 161 | D3DXGetShaderConstantTable 162 | D3DXGetShaderInputSemantics 163 | D3DXGetShaderOutputSemantics 164 | D3DXGetShaderSamplers 165 | D3DXGetShaderSize 166 | D3DXGetShaderVersion 167 | D3DXGetVertexShaderProfile 168 | D3DXIntersect 169 | D3DXIntersectSubset 170 | D3DXIntersectTri 171 | D3DXLoadMeshFromXA 172 | D3DXLoadMeshFromXInMemory 173 | D3DXLoadMeshFromXResource 174 | D3DXLoadMeshFromXW 175 | D3DXLoadMeshFromXof 176 | D3DXLoadMeshHierarchyFromXA 177 | D3DXLoadMeshHierarchyFromXInMemory 178 | D3DXLoadMeshHierarchyFromXW 179 | D3DXLoadPRTBufferFromFileA 180 | D3DXLoadPRTBufferFromFileW 181 | D3DXLoadPRTCompBufferFromFileA 182 | D3DXLoadPRTCompBufferFromFileW 183 | D3DXLoadPatchMeshFromXof 184 | D3DXLoadSkinMeshFromXof 185 | D3DXLoadSurfaceFromFileA 186 | D3DXLoadSurfaceFromFileInMemory 187 | D3DXLoadSurfaceFromFileW 188 | D3DXLoadSurfaceFromMemory 189 | D3DXLoadSurfaceFromResourceA 190 | D3DXLoadSurfaceFromResourceW 191 | D3DXLoadSurfaceFromSurface 192 | D3DXLoadVolumeFromFileA 193 | D3DXLoadVolumeFromFileInMemory 194 | D3DXLoadVolumeFromFileW 195 | D3DXLoadVolumeFromMemory 196 | D3DXLoadVolumeFromResourceA 197 | D3DXLoadVolumeFromResourceW 198 | D3DXLoadVolumeFromVolume 199 | D3DXMatrixAffineTransformation2D 200 | D3DXMatrixAffineTransformation 201 | D3DXMatrixDecompose 202 | D3DXMatrixDeterminant 203 | D3DXMatrixInverse 204 | D3DXMatrixLookAtLH 205 | D3DXMatrixLookAtRH 206 | D3DXMatrixMultiply 207 | D3DXMatrixMultiplyTranspose 208 | D3DXMatrixOrthoLH 209 | D3DXMatrixOrthoOffCenterLH 210 | D3DXMatrixOrthoOffCenterRH 211 | D3DXMatrixOrthoRH 212 | D3DXMatrixPerspectiveFovLH 213 | D3DXMatrixPerspectiveFovRH 214 | D3DXMatrixPerspectiveLH 215 | D3DXMatrixPerspectiveOffCenterLH 216 | D3DXMatrixPerspectiveOffCenterRH 217 | D3DXMatrixPerspectiveRH 218 | D3DXMatrixReflect 219 | D3DXMatrixRotationAxis 220 | D3DXMatrixRotationQuaternion 221 | D3DXMatrixRotationX 222 | D3DXMatrixRotationY 223 | D3DXMatrixRotationYawPitchRoll 224 | D3DXMatrixRotationZ 225 | D3DXMatrixScaling 226 | D3DXMatrixShadow 227 | D3DXMatrixTransformation2D 228 | D3DXMatrixTransformation 229 | D3DXMatrixTranslation 230 | D3DXMatrixTranspose 231 | D3DXOptimizeFaces 232 | D3DXOptimizeVertices 233 | D3DXPlaneFromPointNormal 234 | D3DXPlaneFromPoints 235 | D3DXPlaneIntersectLine 236 | D3DXPlaneNormalize 237 | D3DXPlaneTransform 238 | D3DXPlaneTransformArray 239 | D3DXPreprocessShader 240 | D3DXPreprocessShaderFromFileA 241 | D3DXPreprocessShaderFromFileW 242 | D3DXPreprocessShaderFromResourceA 243 | D3DXPreprocessShaderFromResourceW 244 | D3DXQuaternionBaryCentric 245 | D3DXQuaternionExp 246 | D3DXQuaternionInverse 247 | D3DXQuaternionLn 248 | D3DXQuaternionMultiply 249 | D3DXQuaternionNormalize 250 | D3DXQuaternionRotationAxis 251 | D3DXQuaternionRotationMatrix 252 | D3DXQuaternionRotationYawPitchRoll 253 | D3DXQuaternionSlerp 254 | D3DXQuaternionSquad 255 | D3DXQuaternionSquadSetup 256 | D3DXQuaternionToAxisAngle 257 | D3DXRectPatchSize 258 | D3DXSHAdd 259 | D3DXSHDot 260 | D3DXSHEvalConeLight 261 | D3DXSHEvalDirection 262 | D3DXSHEvalDirectionalLight 263 | D3DXSHEvalHemisphereLight 264 | D3DXSHEvalSphericalLight 265 | D3DXSHMultiply2 266 | D3DXSHMultiply3 267 | D3DXSHMultiply4 268 | D3DXSHMultiply5 269 | D3DXSHMultiply6 270 | D3DXSHPRTCompSplitMeshSC 271 | D3DXSHPRTCompSuperCluster 272 | D3DXSHProjectCubeMap 273 | D3DXSHRotate 274 | D3DXSHRotateZ 275 | D3DXSHScale 276 | D3DXSaveMeshHierarchyToFileA 277 | D3DXSaveMeshHierarchyToFileW 278 | D3DXSaveMeshToXA 279 | D3DXSaveMeshToXW 280 | D3DXSavePRTBufferToFileA 281 | D3DXSavePRTBufferToFileW 282 | D3DXSavePRTCompBufferToFileA 283 | D3DXSavePRTCompBufferToFileW 284 | D3DXSaveSurfaceToFileA 285 | D3DXSaveSurfaceToFileInMemory 286 | D3DXSaveSurfaceToFileW 287 | D3DXSaveTextureToFileA 288 | D3DXSaveTextureToFileInMemory 289 | D3DXSaveTextureToFileW 290 | D3DXSaveVolumeToFileA 291 | D3DXSaveVolumeToFileInMemory 292 | D3DXSaveVolumeToFileW 293 | D3DXSimplifyMesh 294 | D3DXSphereBoundProbe 295 | D3DXSplitMesh 296 | D3DXTessellateNPatches 297 | D3DXTessellateRectPatch 298 | D3DXTessellateTriPatch 299 | D3DXTriPatchSize 300 | D3DXUVAtlasCreate 301 | D3DXUVAtlasPack 302 | D3DXUVAtlasPartition 303 | D3DXValidMesh 304 | D3DXValidPatchMesh 305 | D3DXVec2BaryCentric 306 | D3DXVec2CatmullRom 307 | D3DXVec2Hermite 308 | D3DXVec2Normalize 309 | D3DXVec2Transform 310 | D3DXVec2TransformArray 311 | D3DXVec2TransformCoord 312 | D3DXVec2TransformCoordArray 313 | D3DXVec2TransformNormal 314 | D3DXVec2TransformNormalArray 315 | D3DXVec3BaryCentric 316 | D3DXVec3CatmullRom 317 | D3DXVec3Hermite 318 | D3DXVec3Normalize 319 | D3DXVec3Project 320 | D3DXVec3ProjectArray 321 | D3DXVec3Transform 322 | D3DXVec3TransformArray 323 | D3DXVec3TransformCoord 324 | D3DXVec3TransformCoordArray 325 | D3DXVec3TransformNormal 326 | D3DXVec3TransformNormalArray 327 | D3DXVec3Unproject 328 | D3DXVec3UnprojectArray 329 | D3DXVec4BaryCentric 330 | D3DXVec4CatmullRom 331 | D3DXVec4Cross 332 | D3DXVec4Hermite 333 | D3DXVec4Normalize 334 | D3DXVec4Transform 335 | D3DXVec4TransformArray 336 | D3DXWeldVertices 337 | -------------------------------------------------------------------------------- /Lib/x64/dxgi.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Definition file of dxgi.dll 3 | ; Automatic generated by gendef 4 | ; written by Kai Tietz 2008 5 | ; 6 | LIBRARY "dxgi.dll" 7 | EXPORTS 8 | D3DKMTCloseAdapter 9 | D3DKMTDestroyAllocation 10 | D3DKMTDestroyContext 11 | D3DKMTDestroyDevice 12 | D3DKMTDestroySynchronizationObject 13 | D3DKMTQueryAdapterInfo 14 | D3DKMTSetDisplayPrivateDriverFormat 15 | D3DKMTSignalSynchronizationObject 16 | D3DKMTUnlock 17 | DXGIDumpJournal 18 | OpenAdapter10 19 | OpenAdapter10_2 20 | CreateDXGIFactory1 21 | CreateDXGIFactory 22 | D3DKMTCreateAllocation 23 | D3DKMTCreateContext 24 | D3DKMTCreateDevice 25 | D3DKMTCreateSynchronizationObject 26 | D3DKMTEscape 27 | D3DKMTGetContextSchedulingPriority 28 | D3DKMTGetDeviceState 29 | D3DKMTGetDisplayModeList 30 | D3DKMTGetMultisampleMethodList 31 | D3DKMTGetRuntimeData 32 | D3DKMTGetSharedPrimaryHandle 33 | D3DKMTLock 34 | D3DKMTOpenAdapterFromHdc 35 | D3DKMTOpenResource 36 | D3DKMTPresent 37 | D3DKMTQueryAllocationResidency 38 | D3DKMTQueryResourceInfo 39 | D3DKMTRender 40 | D3DKMTSetAllocationPriority 41 | D3DKMTSetContextSchedulingPriority 42 | D3DKMTSetDisplayMode 43 | D3DKMTSetGammaRamp 44 | D3DKMTSetVidPnSourceOwner 45 | D3DKMTWaitForSynchronizationObject 46 | D3DKMTWaitForVerticalBlankEvent 47 | DXGID3D10CreateDevice 48 | DXGID3D10CreateLayeredDevice 49 | DXGID3D10GetLayeredDeviceSize 50 | DXGID3D10RegisterLayers 51 | DXGIReportAdapterConfiguration 52 | -------------------------------------------------------------------------------- /Lib/x86/Makefile: -------------------------------------------------------------------------------- 1 | DLLTOOL = i686-w64-mingw32-dlltool 2 | 3 | all: \ 4 | $(patsubst %.def,lib%.a,$(wildcard *.def)) 5 | 6 | lib%.a: %.def 7 | $(DLLTOOL) -k --def $< --output-lib $@ 8 | -------------------------------------------------------------------------------- /Lib/x86/d3d10.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d10.dll" 2 | EXPORTS 3 | D3D10CompileEffectFromMemory@36 4 | D3D10CompileShader@40 5 | D3D10CreateBlob@8 6 | D3D10CreateDevice@24 7 | D3D10CreateDeviceAndSwapChain@32 8 | D3D10CreateEffectFromMemory@24 9 | D3D10CreateEffectPoolFromMemory@20 10 | D3D10CreateStateBlock@12 11 | D3D10DisassembleEffect@12 12 | D3D10DisassembleShader@20 13 | D3D10GetGeometryShaderProfile@4 14 | D3D10GetInputAndOutputSignatureBlob@12 15 | D3D10GetInputSignatureBlob@12 16 | D3D10GetOutputSignatureBlob@12 17 | D3D10GetPixelShaderProfile@4 18 | D3D10GetShaderDebugInfo@12 19 | D3D10GetVersion 20 | D3D10GetVertexShaderProfile@4 21 | D3D10PreprocessShader@28 22 | D3D10ReflectShader@12 23 | D3D10RegisterLayers 24 | D3D10StateBlockMaskDifference@12 25 | D3D10StateBlockMaskDisableAll@4 26 | D3D10StateBlockMaskDisableCapture@16 27 | D3D10StateBlockMaskEnableAll@4 28 | D3D10StateBlockMaskEnableCapture@16 29 | D3D10StateBlockMaskGetSetting@12 30 | D3D10StateBlockMaskIntersect@12 31 | D3D10StateBlockMaskUnion@12 32 | -------------------------------------------------------------------------------- /Lib/x86/d3d10_1.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d10_1.dll" 2 | EXPORTS 3 | D3D10CompileEffectFromMemory@36 4 | D3D10CompileShader@40 5 | D3D10CreateBlob@8 6 | D3D10CreateDevice1@28 7 | D3D10CreateDeviceAndSwapChain1@36 8 | D3D10CreateEffectFromMemory@24 9 | D3D10CreateEffectPoolFromMemory@20 10 | D3D10CreateStateBlock@12 11 | D3D10DisassembleEffect@12 12 | D3D10DisassembleShader@20 13 | D3D10GetGeometryShaderProfile@4 14 | D3D10GetInputAndOutputSignatureBlob@12 15 | D3D10GetInputSignatureBlob@12 16 | D3D10GetOutputSignatureBlob@12 17 | D3D10GetPixelShaderProfile@4 18 | D3D10GetShaderDebugInfo@12 19 | D3D10GetVersion 20 | D3D10GetVertexShaderProfile@4 21 | D3D10PreprocessShader@28 22 | D3D10ReflectShader@12 23 | D3D10RegisterLayers 24 | D3D10StateBlockMaskDifference@12 25 | D3D10StateBlockMaskDisableAll@4 26 | D3D10StateBlockMaskDisableCapture@16 27 | D3D10StateBlockMaskEnableAll@4 28 | D3D10StateBlockMaskEnableCapture@16 29 | D3D10StateBlockMaskGetSetting@12 30 | D3D10StateBlockMaskIntersect@12 31 | D3D10StateBlockMaskUnion@12 32 | -------------------------------------------------------------------------------- /Lib/x86/d3d11.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d11.dll" 2 | EXPORTS 3 | D3DKMTCloseAdapter@4 4 | D3DKMTDestroyAllocation@4 5 | D3DKMTDestroyContext@4 6 | D3DKMTDestroyDevice@4 7 | D3DKMTDestroySynchronizationObject@4 8 | D3DKMTQueryAdapterInfo@4 9 | D3DKMTSetDisplayPrivateDriverFormat@4 10 | D3DKMTSignalSynchronizationObject@4 11 | D3DKMTUnlock@4 12 | D3DKMTWaitForSynchronizationObject@4 13 | OpenAdapter10@4 14 | OpenAdapter10_2@4 15 | D3D11CoreCreateDevice@40 16 | D3D11CoreCreateLayeredDevice@20 17 | D3D11CoreGetLayeredDeviceSize@8 18 | D3D11CoreRegisterLayers@8 19 | D3D11CreateDevice@40 20 | D3D11CreateDeviceAndSwapChain@48 21 | D3DKMTCreateAllocation@4 22 | D3DKMTCreateContext@4 23 | D3DKMTCreateDevice@4 24 | D3DKMTCreateSynchronizationObject@4 25 | D3DKMTEscape@4 26 | D3DKMTGetContextSchedulingPriority@4 27 | D3DKMTGetDeviceState@4 28 | D3DKMTGetDisplayModeList@4 29 | D3DKMTGetMultisampleMethodList@4 30 | D3DKMTGetRuntimeData@4 31 | D3DKMTGetSharedPrimaryHandle@4 32 | D3DKMTLock@4 33 | D3DKMTOpenAdapterFromHdc@4 34 | D3DKMTOpenResource@4 35 | D3DKMTPresent@4 36 | D3DKMTQueryAllocationResidency@4 37 | D3DKMTQueryResourceInfo@4 38 | D3DKMTRender@4 39 | D3DKMTSetAllocationPriority@4 40 | D3DKMTSetContextSchedulingPriority@4 41 | D3DKMTSetDisplayMode@4 42 | D3DKMTSetGammaRamp@4 43 | D3DKMTSetVidPnSourceOwner@4 44 | D3DKMTWaitForVerticalBlankEvent@4 45 | -------------------------------------------------------------------------------- /Lib/x86/d3d9.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3d9.dll" 2 | EXPORTS 3 | Direct3DShaderValidatorCreate9@@YGPAUIDirect3DShaderValidator9@@XZ 4 | PSGPError@@YGXPAVD3DFE_PROCESSVERTICES@@W4PSGPERRORID@@I@Z 5 | PSGPSampleTexture@@YGXPAVD3DFE_PROCESSVERTICES@@IQAY03MI1@Z 6 | D3DPERF_BeginEvent@8 7 | D3DPERF_EndEvent@0 8 | D3DPERF_GetStatus@0 9 | D3DPERF_QueryRepeatFrame@0 10 | D3DPERF_SetMarker@8 11 | D3DPERF_SetOptions@4 12 | D3DPERF_SetRegion@8 13 | DebugSetLevel 14 | DebugSetMute 15 | Direct3DCreate9@4 16 | Direct3DCreate9Ex@8 17 | -------------------------------------------------------------------------------- /Lib/x86/d3dx10.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3dx10_35.dll" 2 | EXPORTS 3 | D3DX10CreateThreadPump@@YGJIIPAPAUID3DX10ThreadPump@@@Z 4 | D3DX10CheckVersion@8 5 | D3DX10CompileFromFileA@44 6 | D3DX10CompileFromFileW@44 7 | D3DX10CompileFromMemory@52 8 | D3DX10CompileFromResourceA@52 9 | D3DX10CompileFromResourceW@52 10 | D3DX10ComputeNormalMap@20 11 | D3DX10CreateAsyncCompilerProcessor@40 12 | D3DX10CreateAsyncEffectCreateProcessor@40 13 | D3DX10CreateAsyncEffectPoolCreateProcessor@36 14 | D3DX10CreateAsyncFileLoaderA@8 15 | D3DX10CreateAsyncFileLoaderW@8 16 | D3DX10CreateAsyncMemoryLoader@12 17 | D3DX10CreateAsyncResourceLoaderA@12 18 | D3DX10CreateAsyncResourceLoaderW@12 19 | D3DX10CreateAsyncShaderPreprocessProcessor@24 20 | D3DX10CreateAsyncShaderResourceViewProcessor@12 21 | D3DX10CreateAsyncTextureInfoProcessor@8 22 | D3DX10CreateAsyncTextureProcessor@12 23 | D3DX10CreateDevice@20 24 | D3DX10CreateDeviceAndSwapChain@28 25 | D3DX10CreateEffectFromFileA@48 26 | D3DX10CreateEffectFromFileW@48 27 | D3DX10CreateEffectFromMemory@56 28 | D3DX10CreateEffectFromResourceA@56 29 | D3DX10CreateEffectFromResourceW@56 30 | D3DX10CreateEffectPoolFromFileA@44 31 | D3DX10CreateEffectPoolFromFileW@44 32 | D3DX10CreateEffectPoolFromMemory@52 33 | D3DX10CreateEffectPoolFromResourceA@52 34 | D3DX10CreateEffectPoolFromResourceW@52 35 | D3DX10CreateFontA@48 36 | D3DX10CreateFontIndirectA@12 37 | D3DX10CreateFontIndirectW@12 38 | D3DX10CreateFontW@48 39 | D3DX10CreateMesh@32 40 | D3DX10CreateShaderResourceViewFromFileA@24 41 | D3DX10CreateShaderResourceViewFromFileW@24 42 | D3DX10CreateShaderResourceViewFromMemory@28 43 | D3DX10CreateShaderResourceViewFromResourceA@28 44 | D3DX10CreateShaderResourceViewFromResourceW@28 45 | D3DX10CreateSkinInfo@4 46 | D3DX10CreateSprite@12 47 | D3DX10CreateTextureFromFileA@24 48 | D3DX10CreateTextureFromFileW@24 49 | D3DX10CreateTextureFromMemory@28 50 | D3DX10CreateTextureFromResourceA@28 51 | D3DX10CreateTextureFromResourceW@28 52 | D3DX10DisassembleEffect@12 53 | D3DX10DisassembleShader@20 54 | D3DX10FilterTexture@12 55 | D3DX10GetDriverLevel@4 56 | D3DX10GetFeatureLevel1@8 57 | D3DX10GetImageInfoFromFileA@16 58 | D3DX10GetImageInfoFromFileW@16 59 | D3DX10GetImageInfoFromMemory@20 60 | D3DX10GetImageInfoFromResourceA@20 61 | D3DX10GetImageInfoFromResourceW@20 62 | D3DX10LoadTextureFromTexture@12 63 | D3DX10PreprocessShaderFromFileA@28 64 | D3DX10PreprocessShaderFromFileW@28 65 | D3DX10PreprocessShaderFromMemory@36 66 | D3DX10PreprocessShaderFromResourceA@36 67 | D3DX10PreprocessShaderFromResourceW@36 68 | D3DX10ReflectShader@12 69 | D3DX10SHProjectCubeMap@20 70 | D3DX10SaveTextureToFileA@12 71 | D3DX10SaveTextureToFileW@12 72 | D3DX10SaveTextureToMemory@16 73 | D3DX10UnsetAllDeviceObjects@4 74 | D3DXBoxBoundProbe@16 75 | D3DXColorAdjustContrast@12 76 | D3DXColorAdjustSaturation@12 77 | D3DXComputeBoundingBox@20 78 | D3DXComputeBoundingSphere@20 79 | D3DXCpuOptimizations@4 80 | D3DXCreateMatrixStack@8 81 | D3DXFloat16To32Array@12 82 | D3DXFloat32To16Array@12 83 | D3DXFresnelTerm@8 84 | D3DXIntersectTri@32 85 | D3DXMatrixAffineTransformation2D@20 86 | D3DXMatrixAffineTransformation@20 87 | D3DXMatrixDecompose@16 88 | D3DXMatrixDeterminant@4 89 | D3DXMatrixInverse@12 90 | D3DXMatrixLookAtLH@16 91 | D3DXMatrixLookAtRH@16 92 | D3DXMatrixMultiply@12 93 | D3DXMatrixMultiplyTranspose@12 94 | D3DXMatrixOrthoLH@20 95 | D3DXMatrixOrthoOffCenterLH@28 96 | D3DXMatrixOrthoOffCenterRH@28 97 | D3DXMatrixOrthoRH@20 98 | D3DXMatrixPerspectiveFovLH@20 99 | D3DXMatrixPerspectiveFovRH@20 100 | D3DXMatrixPerspectiveLH@20 101 | D3DXMatrixPerspectiveOffCenterLH@28 102 | D3DXMatrixPerspectiveOffCenterRH@28 103 | D3DXMatrixPerspectiveRH@20 104 | D3DXMatrixReflect@8 105 | D3DXMatrixRotationAxis@12 106 | D3DXMatrixRotationQuaternion@8 107 | D3DXMatrixRotationX@8 108 | D3DXMatrixRotationY@8 109 | D3DXMatrixRotationYawPitchRoll@16 110 | D3DXMatrixRotationZ@8 111 | D3DXMatrixScaling@16 112 | D3DXMatrixShadow@12 113 | D3DXMatrixTransformation2D@28 114 | D3DXMatrixTransformation@28 115 | D3DXMatrixTranslation@16 116 | D3DXMatrixTranspose@8 117 | D3DXPlaneFromPointNormal@12 118 | D3DXPlaneFromPoints@16 119 | D3DXPlaneIntersectLine@16 120 | D3DXPlaneNormalize@8 121 | D3DXPlaneTransform@12 122 | D3DXPlaneTransformArray@24 123 | D3DXQuaternionBaryCentric@24 124 | D3DXQuaternionExp@8 125 | D3DXQuaternionInverse@8 126 | D3DXQuaternionLn@8 127 | D3DXQuaternionMultiply@12 128 | D3DXQuaternionNormalize@8 129 | D3DXQuaternionRotationAxis@12 130 | D3DXQuaternionRotationMatrix@8 131 | D3DXQuaternionRotationYawPitchRoll@16 132 | D3DXQuaternionSlerp@16 133 | D3DXQuaternionSquad@24 134 | D3DXQuaternionSquadSetup@28 135 | D3DXQuaternionToAxisAngle@12 136 | D3DXSHAdd@16 137 | D3DXSHDot@12 138 | D3DXSHEvalConeLight@36 139 | D3DXSHEvalDirection@12 140 | D3DXSHEvalDirectionalLight@32 141 | D3DXSHEvalHemisphereLight@52 142 | D3DXSHEvalSphericalLight@36 143 | D3DXSHMultiply2@12 144 | D3DXSHMultiply3@12 145 | D3DXSHMultiply4@12 146 | D3DXSHMultiply5@12 147 | D3DXSHMultiply6@12 148 | D3DXSHRotate@16 149 | D3DXSHRotateZ@16 150 | D3DXSHScale@16 151 | D3DXSphereBoundProbe@16 152 | D3DXVec2BaryCentric@24 153 | D3DXVec2CatmullRom@24 154 | D3DXVec2Hermite@24 155 | D3DXVec2Normalize@8 156 | D3DXVec2Transform@12 157 | D3DXVec2TransformArray@24 158 | D3DXVec2TransformCoord@12 159 | D3DXVec2TransformCoordArray@24 160 | D3DXVec2TransformNormal@12 161 | D3DXVec2TransformNormalArray@24 162 | D3DXVec3BaryCentric@24 163 | D3DXVec3CatmullRom@24 164 | D3DXVec3Hermite@24 165 | D3DXVec3Normalize@8 166 | D3DXVec3Project@24 167 | D3DXVec3ProjectArray@36 168 | D3DXVec3Transform@12 169 | D3DXVec3TransformArray@24 170 | D3DXVec3TransformCoord@12 171 | D3DXVec3TransformCoordArray@24 172 | D3DXVec3TransformNormal@12 173 | D3DXVec3TransformNormalArray@24 174 | D3DXVec3Unproject@24 175 | D3DXVec3UnprojectArray@36 176 | D3DXVec4BaryCentric@24 177 | D3DXVec4CatmullRom@24 178 | D3DXVec4Cross@16 179 | D3DXVec4Hermite@24 180 | D3DXVec4Normalize@8 181 | D3DXVec4Transform@12 182 | D3DXVec4TransformArray@24 183 | -------------------------------------------------------------------------------- /Lib/x86/d3dx9.def: -------------------------------------------------------------------------------- 1 | LIBRARY "d3dx9_35.dll" 2 | EXPORTS 3 | D3DXAssembleShader@28 4 | D3DXAssembleShaderFromFileA@24 5 | D3DXAssembleShaderFromFileW@24 6 | D3DXAssembleShaderFromResourceA@28 7 | D3DXAssembleShaderFromResourceW@28 8 | D3DXBoxBoundProbe@16 9 | D3DXCheckCubeTextureRequirements@24 10 | D3DXCheckTextureRequirements@28 11 | D3DXCheckVersion@8 12 | D3DXCheckVolumeTextureRequirements@32 13 | D3DXCleanMesh@24 14 | D3DXColorAdjustContrast@12 15 | D3DXColorAdjustSaturation@12 16 | D3DXCompileShader@40 17 | D3DXCompileShaderFromFileA@36 18 | D3DXCompileShaderFromFileW@36 19 | D3DXCompileShaderFromResourceA@40 20 | D3DXCompileShaderFromResourceW@40 21 | D3DXComputeBoundingBox@20 22 | D3DXComputeBoundingSphere@20 23 | D3DXComputeIMTFromPerTexelSignal@44 24 | D3DXComputeIMTFromPerVertexSignal@32 25 | D3DXComputeIMTFromSignal@40 26 | D3DXComputeIMTFromTexture@28 27 | D3DXComputeNormalMap@24 28 | D3DXComputeNormals@8 29 | D3DXComputeTangent@24 30 | D3DXComputeTangentFrame@8 31 | D3DXComputeTangentFrameEx@64 32 | D3DXConcatenateMeshes@32 33 | D3DXConvertMeshSubsetToSingleStrip@20 34 | D3DXConvertMeshSubsetToStrips@28 35 | D3DXCreateAnimationController@20 36 | D3DXCreateBox@24 37 | D3DXCreateBuffer@8 38 | D3DXCreateCompressedAnimationSet@32 39 | D3DXCreateCubeTexture@28 40 | D3DXCreateCubeTextureFromFileA@12 41 | D3DXCreateCubeTextureFromFileExA@52 42 | D3DXCreateCubeTextureFromFileExW@52 43 | D3DXCreateCubeTextureFromFileInMemory@16 44 | D3DXCreateCubeTextureFromFileInMemoryEx@56 45 | D3DXCreateCubeTextureFromFileW@12 46 | D3DXCreateCubeTextureFromResourceA@16 47 | D3DXCreateCubeTextureFromResourceExA@56 48 | D3DXCreateCubeTextureFromResourceExW@56 49 | D3DXCreateCubeTextureFromResourceW@16 50 | D3DXCreateCylinder@32 51 | D3DXCreateEffect@36 52 | D3DXCreateEffectCompiler@28 53 | D3DXCreateEffectCompilerFromFileA@24 54 | D3DXCreateEffectCompilerFromFileW@24 55 | D3DXCreateEffectCompilerFromResourceA@28 56 | D3DXCreateEffectCompilerFromResourceW@28 57 | D3DXCreateEffectEx@40 58 | D3DXCreateEffectFromFileA@32 59 | D3DXCreateEffectFromFileExA@36 60 | D3DXCreateEffectFromFileExW@36 61 | D3DXCreateEffectFromFileW@32 62 | D3DXCreateEffectFromResourceA@36 63 | D3DXCreateEffectFromResourceExA@40 64 | D3DXCreateEffectFromResourceExW@40 65 | D3DXCreateEffectFromResourceW@36 66 | D3DXCreateEffectPool@4 67 | D3DXCreateFontA@48 68 | D3DXCreateFontIndirectA@12 69 | D3DXCreateFontIndirectW@12 70 | D3DXCreateFontW@48 71 | D3DXCreateFragmentLinker@12 72 | D3DXCreateKeyframedAnimationSet@32 73 | D3DXCreateLine@8 74 | D3DXCreateMatrixStack@8 75 | D3DXCreateMesh@24 76 | D3DXCreateMeshFVF@24 77 | D3DXCreateNPatchMesh@8 78 | D3DXCreatePMeshFromStream@28 79 | D3DXCreatePRTBuffer@16 80 | D3DXCreatePRTBufferTex@20 81 | D3DXCreatePRTCompBuffer@28 82 | D3DXCreatePRTEngine@20 83 | D3DXCreatePatchMesh@28 84 | D3DXCreatePolygon@20 85 | D3DXCreateRenderToEnvMap@28 86 | D3DXCreateRenderToSurface@28 87 | D3DXCreateSPMesh@20 88 | D3DXCreateSkinInfo@16 89 | D3DXCreateSkinInfoFVF@16 90 | D3DXCreateSkinInfoFromBlendedMesh@16 91 | D3DXCreateSphere@24 92 | D3DXCreateSprite@8 93 | D3DXCreateTeapot@12 94 | D3DXCreateTextA@32 95 | D3DXCreateTextW@32 96 | D3DXCreateTexture@32 97 | D3DXCreateTextureFromFileA@12 98 | D3DXCreateTextureFromFileExA@56 99 | D3DXCreateTextureFromFileExW@56 100 | D3DXCreateTextureFromFileInMemory@16 101 | D3DXCreateTextureFromFileInMemoryEx@60 102 | D3DXCreateTextureFromFileW@12 103 | D3DXCreateTextureFromResourceA@16 104 | D3DXCreateTextureFromResourceExA@60 105 | D3DXCreateTextureFromResourceExW@60 106 | D3DXCreateTextureFromResourceW@16 107 | D3DXCreateTextureGutterHelper@20 108 | D3DXCreateTextureShader@8 109 | D3DXCreateTorus@28 110 | D3DXCreateVolumeTexture@36 111 | D3DXCreateVolumeTextureFromFileA@12 112 | D3DXCreateVolumeTextureFromFileExA@60 113 | D3DXCreateVolumeTextureFromFileExW@60 114 | D3DXCreateVolumeTextureFromFileInMemory@16 115 | D3DXCreateVolumeTextureFromFileInMemoryEx@64 116 | D3DXCreateVolumeTextureFromFileW@12 117 | D3DXCreateVolumeTextureFromResourceA@16 118 | D3DXCreateVolumeTextureFromResourceExA@64 119 | D3DXCreateVolumeTextureFromResourceExW@64 120 | D3DXCreateVolumeTextureFromResourceW@16 121 | D3DXDebugMute@4 122 | D3DXDeclaratorFromFVF@8 123 | D3DXDisassembleEffect@12 124 | D3DXDisassembleShader@16 125 | D3DXFVFFromDeclarator@8 126 | D3DXFileCreate@4 127 | D3DXFillCubeTexture@12 128 | D3DXFillCubeTextureTX@8 129 | D3DXFillTexture@12 130 | D3DXFillTextureTX@8 131 | D3DXFillVolumeTexture@12 132 | D3DXFillVolumeTextureTX@8 133 | D3DXFilterTexture@16 134 | D3DXFindShaderComment@16 135 | D3DXFloat16To32Array@12 136 | D3DXFloat32To16Array@12 137 | D3DXFrameAppendChild@8 138 | D3DXFrameCalculateBoundingSphere@12 139 | D3DXFrameDestroy@8 140 | D3DXFrameFind@8 141 | D3DXFrameNumNamedMatrices@4 142 | D3DXFrameRegisterNamedMatrices@8 143 | D3DXFresnelTerm@8 144 | D3DXGatherFragments@28 145 | D3DXGatherFragmentsFromFileA@24 146 | D3DXGatherFragmentsFromFileW@24 147 | D3DXGatherFragmentsFromResourceA@28 148 | D3DXGatherFragmentsFromResourceW@28 149 | D3DXGenerateOutputDecl@8 150 | D3DXGeneratePMesh@28 151 | D3DXGetDeclLength@4 152 | D3DXGetDeclVertexSize@8 153 | D3DXGetDriverLevel@4 154 | D3DXGetFVFVertexSize@4 155 | D3DXGetImageInfoFromFileA@8 156 | D3DXGetImageInfoFromFileInMemory@12 157 | D3DXGetImageInfoFromFileW@8 158 | D3DXGetImageInfoFromResourceA@12 159 | D3DXGetImageInfoFromResourceW@12 160 | D3DXGetPixelShaderProfile@4 161 | D3DXGetShaderConstantTable@8 162 | D3DXGetShaderInputSemantics@12 163 | D3DXGetShaderOutputSemantics@12 164 | D3DXGetShaderSamplers@12 165 | D3DXGetShaderSize@4 166 | D3DXGetShaderVersion@4 167 | D3DXGetVertexShaderProfile@4 168 | D3DXIntersect@40 169 | D3DXIntersectSubset@44 170 | D3DXIntersectTri@32 171 | D3DXLoadMeshFromXA@32 172 | D3DXLoadMeshFromXInMemory@36 173 | D3DXLoadMeshFromXResource@40 174 | D3DXLoadMeshFromXW@32 175 | D3DXLoadMeshFromXof@32 176 | D3DXLoadMeshHierarchyFromXA@28 177 | D3DXLoadMeshHierarchyFromXInMemory@32 178 | D3DXLoadMeshHierarchyFromXW@28 179 | D3DXLoadPRTBufferFromFileA@8 180 | D3DXLoadPRTBufferFromFileW@8 181 | D3DXLoadPRTCompBufferFromFileA@8 182 | D3DXLoadPRTCompBufferFromFileW@8 183 | D3DXLoadPatchMeshFromXof@28 184 | D3DXLoadSkinMeshFromXof@36 185 | D3DXLoadSurfaceFromFileA@32 186 | D3DXLoadSurfaceFromFileInMemory@36 187 | D3DXLoadSurfaceFromFileW@32 188 | D3DXLoadSurfaceFromMemory@40 189 | D3DXLoadSurfaceFromResourceA@36 190 | D3DXLoadSurfaceFromResourceW@36 191 | D3DXLoadSurfaceFromSurface@32 192 | D3DXLoadVolumeFromFileA@32 193 | D3DXLoadVolumeFromFileInMemory@36 194 | D3DXLoadVolumeFromFileW@32 195 | D3DXLoadVolumeFromMemory@44 196 | D3DXLoadVolumeFromResourceA@36 197 | D3DXLoadVolumeFromResourceW@36 198 | D3DXLoadVolumeFromVolume@32 199 | D3DXMatrixAffineTransformation2D@20 200 | D3DXMatrixAffineTransformation@20 201 | D3DXMatrixDecompose@16 202 | D3DXMatrixDeterminant@4 203 | D3DXMatrixInverse@12 204 | D3DXMatrixLookAtLH@16 205 | D3DXMatrixLookAtRH@16 206 | D3DXMatrixMultiply@12 207 | D3DXMatrixMultiplyTranspose@12 208 | D3DXMatrixOrthoLH@20 209 | D3DXMatrixOrthoOffCenterLH@28 210 | D3DXMatrixOrthoOffCenterRH@28 211 | D3DXMatrixOrthoRH@20 212 | D3DXMatrixPerspectiveFovLH@20 213 | D3DXMatrixPerspectiveFovRH@20 214 | D3DXMatrixPerspectiveLH@20 215 | D3DXMatrixPerspectiveOffCenterLH@28 216 | D3DXMatrixPerspectiveOffCenterRH@28 217 | D3DXMatrixPerspectiveRH@20 218 | D3DXMatrixReflect@8 219 | D3DXMatrixRotationAxis@12 220 | D3DXMatrixRotationQuaternion@8 221 | D3DXMatrixRotationX@8 222 | D3DXMatrixRotationY@8 223 | D3DXMatrixRotationYawPitchRoll@16 224 | D3DXMatrixRotationZ@8 225 | D3DXMatrixScaling@16 226 | D3DXMatrixShadow@12 227 | D3DXMatrixTransformation2D@28 228 | D3DXMatrixTransformation@28 229 | D3DXMatrixTranslation@16 230 | D3DXMatrixTranspose@8 231 | D3DXOptimizeFaces@20 232 | D3DXOptimizeVertices@20 233 | D3DXPlaneFromPointNormal@12 234 | D3DXPlaneFromPoints@16 235 | D3DXPlaneIntersectLine@16 236 | D3DXPlaneNormalize@8 237 | D3DXPlaneTransform@12 238 | D3DXPlaneTransformArray@24 239 | D3DXPreprocessShader@24 240 | D3DXPreprocessShaderFromFileA@20 241 | D3DXPreprocessShaderFromFileW@20 242 | D3DXPreprocessShaderFromResourceA@24 243 | D3DXPreprocessShaderFromResourceW@24 244 | D3DXQuaternionBaryCentric@24 245 | D3DXQuaternionExp@8 246 | D3DXQuaternionInverse@8 247 | D3DXQuaternionLn@8 248 | D3DXQuaternionMultiply@12 249 | D3DXQuaternionNormalize@8 250 | D3DXQuaternionRotationAxis@12 251 | D3DXQuaternionRotationMatrix@8 252 | D3DXQuaternionRotationYawPitchRoll@16 253 | D3DXQuaternionSlerp@16 254 | D3DXQuaternionSquad@24 255 | D3DXQuaternionSquadSetup@28 256 | D3DXQuaternionToAxisAngle@12 257 | D3DXRectPatchSize@12 258 | D3DXSHAdd@16 259 | D3DXSHDot@12 260 | D3DXSHEvalConeLight@36 261 | D3DXSHEvalDirection@12 262 | D3DXSHEvalDirectionalLight@32 263 | D3DXSHEvalHemisphereLight@52 264 | D3DXSHEvalSphericalLight@36 265 | D3DXSHMultiply2@12 266 | D3DXSHMultiply3@12 267 | D3DXSHMultiply4@12 268 | D3DXSHMultiply5@12 269 | D3DXSHMultiply6@12 270 | D3DXSHPRTCompSplitMeshSC@64 271 | D3DXSHPRTCompSuperCluster@24 272 | D3DXSHProjectCubeMap@20 273 | D3DXSHRotate@16 274 | D3DXSHRotateZ@16 275 | D3DXSHScale@16 276 | D3DXSaveMeshHierarchyToFileA@20 277 | D3DXSaveMeshHierarchyToFileW@20 278 | D3DXSaveMeshToXA@28 279 | D3DXSaveMeshToXW@28 280 | D3DXSavePRTBufferToFileA@8 281 | D3DXSavePRTBufferToFileW@8 282 | D3DXSavePRTCompBufferToFileA@8 283 | D3DXSavePRTCompBufferToFileW@8 284 | D3DXSaveSurfaceToFileA@20 285 | D3DXSaveSurfaceToFileInMemory@20 286 | D3DXSaveSurfaceToFileW@20 287 | D3DXSaveTextureToFileA@16 288 | D3DXSaveTextureToFileInMemory@16 289 | D3DXSaveTextureToFileW@16 290 | D3DXSaveVolumeToFileA@20 291 | D3DXSaveVolumeToFileInMemory@20 292 | D3DXSaveVolumeToFileW@20 293 | D3DXSimplifyMesh@28 294 | D3DXSphereBoundProbe@16 295 | D3DXSplitMesh@36 296 | D3DXTessellateNPatches@24 297 | D3DXTessellateRectPatch@20 298 | D3DXTessellateTriPatch@20 299 | D3DXTriPatchSize@12 300 | D3DXUVAtlasCreate@76 301 | D3DXUVAtlasPack@44 302 | D3DXUVAtlasPartition@68 303 | D3DXValidMesh@12 304 | D3DXValidPatchMesh@16 305 | D3DXVec2BaryCentric@24 306 | D3DXVec2CatmullRom@24 307 | D3DXVec2Hermite@24 308 | D3DXVec2Normalize@8 309 | D3DXVec2Transform@12 310 | D3DXVec2TransformArray@24 311 | D3DXVec2TransformCoord@12 312 | D3DXVec2TransformCoordArray@24 313 | D3DXVec2TransformNormal@12 314 | D3DXVec2TransformNormalArray@24 315 | D3DXVec3BaryCentric@24 316 | D3DXVec3CatmullRom@24 317 | D3DXVec3Hermite@24 318 | D3DXVec3Normalize@8 319 | D3DXVec3Project@24 320 | D3DXVec3ProjectArray@36 321 | D3DXVec3Transform@12 322 | D3DXVec3TransformArray@24 323 | D3DXVec3TransformCoord@12 324 | D3DXVec3TransformCoordArray@24 325 | D3DXVec3TransformNormal@12 326 | D3DXVec3TransformNormalArray@24 327 | D3DXVec3Unproject@24 328 | D3DXVec3UnprojectArray@36 329 | D3DXVec4BaryCentric@24 330 | D3DXVec4CatmullRom@24 331 | D3DXVec4Cross@16 332 | D3DXVec4Hermite@24 333 | D3DXVec4Normalize@8 334 | D3DXVec4Transform@12 335 | D3DXVec4TransformArray@24 336 | D3DXWeldVertices@28 337 | -------------------------------------------------------------------------------- /Lib/x86/dxgi.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Definition file of dxgi.dll 3 | ; Automatic generated by gendef 4 | ; written by Kai Tietz 2008 5 | ; 6 | LIBRARY "dxgi.dll" 7 | EXPORTS 8 | D3DKMTCloseAdapter@4 9 | D3DKMTDestroyAllocation@4 10 | D3DKMTDestroyContext@4 11 | D3DKMTDestroyDevice@4 12 | D3DKMTDestroySynchronizationObject@4 13 | D3DKMTQueryAdapterInfo@4 14 | D3DKMTSetDisplayPrivateDriverFormat@4 15 | D3DKMTSignalSynchronizationObject@4 16 | D3DKMTUnlock@4 17 | DXGIDumpJournal@4 18 | OpenAdapter10@4 19 | OpenAdapter10_2@4 20 | CreateDXGIFactory1@8 21 | CreateDXGIFactory@8 22 | D3DKMTCreateAllocation@4 23 | D3DKMTCreateContext@4 24 | D3DKMTCreateDevice@4 25 | D3DKMTCreateSynchronizationObject@4 26 | D3DKMTEscape@4 27 | D3DKMTGetContextSchedulingPriority@4 28 | D3DKMTGetDeviceState@4 29 | D3DKMTGetDisplayModeList@4 30 | D3DKMTGetMultisampleMethodList@4 31 | D3DKMTGetRuntimeData@4 32 | D3DKMTGetSharedPrimaryHandle@4 33 | D3DKMTLock@4 34 | D3DKMTOpenAdapterFromHdc@4 35 | D3DKMTOpenResource@4 36 | D3DKMTPresent@4 37 | D3DKMTQueryAllocationResidency@4 38 | D3DKMTQueryResourceInfo@4 39 | D3DKMTRender@4 40 | D3DKMTSetAllocationPriority@4 41 | D3DKMTSetContextSchedulingPriority@4 42 | D3DKMTSetDisplayMode@4 43 | D3DKMTSetGammaRamp@4 44 | D3DKMTSetVidPnSourceOwner@4 45 | D3DKMTWaitForSynchronizationObject@4 46 | D3DKMTWaitForVerticalBlankEvent@4 47 | DXGID3D10CreateDevice@24 48 | DXGID3D10CreateLayeredDevice@20 49 | DXGID3D10GetLayeredDeviceSize@8 50 | DXGID3D10RegisterLayers@8 51 | DXGIReportAdapterConfiguration@4 52 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | This repository combines headers of several DXSDK, to facilitate Windows builds 2 | of [Apitrace](https://github.com/apitrace/apitrace). 3 | 4 | Apitrace targets many DirectX APIs, several of which have been deprecated and 5 | can no longer be found on DirectX SDK. 6 | 7 | See the [wiki](https://github.com/apitrace/apitrace/wiki/DirectX-SDK) for more 8 | information on the versions of DirectX SDK. 9 | --------------------------------------------------------------------------------