├── DirectX_Tutorial ├── README.md ├── Tutorial01 │ ├── DXUT │ │ ├── Core │ │ │ └── dpiaware.manifest │ │ └── Optional │ │ │ └── directx.ico │ ├── Resource.h │ ├── Tutorial01.aps │ ├── Tutorial01.cpp │ ├── Tutorial01.jpg │ ├── Tutorial01.rc │ ├── Tutorial01_2008.ncb │ ├── Tutorial01_2008.sln │ ├── Tutorial01_2008.suo │ ├── Tutorial01_2008.vcproj │ ├── Tutorial01_2010.sln │ ├── Tutorial01_2010.vcxproj │ ├── Tutorial01_2010.vcxproj.filters │ ├── directx.ico │ └── x64 │ │ └── Release │ │ ├── BuildLog.htm │ │ ├── Tutorial01.exe │ │ ├── Tutorial01.exe.intermediate.manifest │ │ ├── Tutorial01.obj │ │ ├── Tutorial01.pdb │ │ ├── Tutorial01.res │ │ ├── mt.dep │ │ ├── vc90.idb │ │ └── vc90.pdb ├── Tutorial02 │ ├── DXUT │ │ ├── Core │ │ │ └── dpiaware.manifest │ │ └── Optional │ │ │ └── directx.ico │ ├── Resource.h │ ├── Tutorial02.cpp │ ├── Tutorial02.fx │ ├── Tutorial02.jpg │ ├── Tutorial02.rc │ ├── Tutorial02_2008.ncb │ ├── Tutorial02_2008.sln │ ├── Tutorial02_2008.suo │ ├── Tutorial02_2008.vcproj │ ├── Tutorial02_2010.sln │ ├── Tutorial02_2010.vcxproj │ ├── Tutorial02_2010.vcxproj.filters │ ├── directx.ico │ └── x64 │ │ └── Release │ │ ├── BuildLog.htm │ │ ├── Tutorial02.exe │ │ ├── Tutorial02.exe.intermediate.manifest │ │ ├── Tutorial02.obj │ │ ├── Tutorial02.pdb │ │ ├── Tutorial02.res │ │ ├── mt.dep │ │ ├── vc90.idb │ │ └── vc90.pdb ├── Tutorial03 │ ├── DXUT │ │ ├── Core │ │ │ └── dpiaware.manifest │ │ └── Optional │ │ │ └── directx.ico │ ├── Debug │ │ ├── BuildLog.htm │ │ ├── Tutorial03.exe │ │ ├── Tutorial03.exe.embed.manifest │ │ ├── Tutorial03.exe.embed.manifest.res │ │ ├── Tutorial03.exe.intermediate.manifest │ │ ├── Tutorial03.ilk │ │ ├── Tutorial03.obj │ │ ├── Tutorial03.pdb │ │ ├── Tutorial03.res │ │ ├── mt.dep │ │ ├── vc90.idb │ │ └── vc90.pdb │ ├── Resource.h │ ├── Tutorial03.cpp │ ├── Tutorial03.fx │ ├── Tutorial03.jpg │ ├── Tutorial03.rc │ ├── Tutorial03_2008.ncb │ ├── Tutorial03_2008.sln │ ├── Tutorial03_2008.suo │ ├── Tutorial03_2008.vcproj │ ├── Tutorial03_2010.sln │ ├── Tutorial03_2010.vcxproj │ ├── Tutorial03_2010.vcxproj.filters │ ├── directx.ico │ └── x64 │ │ └── Release │ │ ├── BuildLog.htm │ │ ├── Tutorial03.exe │ │ ├── Tutorial03.exe.intermediate.manifest │ │ ├── Tutorial03.obj │ │ ├── Tutorial03.pdb │ │ ├── Tutorial03.res │ │ ├── mt.dep │ │ ├── vc90.idb │ │ └── vc90.pdb ├── Tutorial04 │ ├── DXUT │ │ ├── Core │ │ │ └── dpiaware.manifest │ │ └── Optional │ │ │ └── directx.ico │ ├── Resource.h │ ├── Tutorial04.cpp │ ├── Tutorial04.fx │ ├── Tutorial04.jpg │ ├── Tutorial04.rc │ ├── Tutorial04_2008.sln │ ├── Tutorial04_2008.vcproj │ ├── Tutorial04_2010.sln │ ├── Tutorial04_2010.vcxproj │ ├── Tutorial04_2010.vcxproj.filters │ └── directx.ico ├── Tutorial05 │ ├── DXUT │ │ ├── Core │ │ │ └── dpiaware.manifest │ │ └── Optional │ │ │ └── directx.ico │ ├── Resource.h │ ├── Tutorial05.cpp │ ├── Tutorial05.fx │ ├── Tutorial05.jpg │ ├── Tutorial05.rc │ ├── Tutorial05_2008.sln │ ├── Tutorial05_2008.vcproj │ ├── Tutorial05_2010.sln │ ├── Tutorial05_2010.vcxproj │ ├── Tutorial05_2010.vcxproj.filters │ └── directx.ico ├── Tutorial06 │ ├── DXUT │ │ ├── Core │ │ │ └── dpiaware.manifest │ │ └── Optional │ │ │ └── directx.ico │ ├── Resource.h │ ├── Tutorial06.cpp │ ├── Tutorial06.fx │ ├── Tutorial06.jpg │ ├── Tutorial06.rc │ ├── Tutorial06_2008.sln │ ├── Tutorial06_2008.vcproj │ ├── Tutorial06_2010.sln │ ├── Tutorial06_2010.vcxproj │ ├── Tutorial06_2010.vcxproj.filters │ └── directx.ico └── Tutorial07 │ ├── DXUT │ ├── Core │ │ └── dpiaware.manifest │ └── Optional │ │ └── directx.ico │ ├── Resource.h │ ├── Tutorial07.cpp │ ├── Tutorial07.fx │ ├── Tutorial07.jpg │ ├── Tutorial07.rc │ ├── Tutorial07_2008.sln │ ├── Tutorial07_2008.vcproj │ ├── Tutorial07_2010.sln │ ├── Tutorial07_2010.vcxproj │ ├── Tutorial07_2010.vcxproj.filters │ ├── directx.ico │ ├── seafloor.dds │ └── x64 │ └── Release │ ├── BuildLog.htm │ ├── Tutorial07.exe │ ├── Tutorial07.exe.intermediate.manifest │ ├── Tutorial07.obj │ ├── Tutorial07.pdb │ ├── Tutorial07.res │ ├── mt.dep │ ├── vc90.idb │ └── vc90.pdb ├── HLSL ├── BasicHLSL │ ├── BasicHLSL.txt │ ├── Debug │ │ ├── BuildLog.htm │ │ ├── Game.exe │ │ ├── Game.exe.embed.manifest │ │ ├── Game.exe.embed.manifest.res │ │ ├── Game.exe.intermediate.manifest │ │ ├── Game.ilk │ │ ├── Game.pdb │ │ ├── d3dlib.obj │ │ ├── mt.dep │ │ ├── vc90.idb │ │ ├── vc90.pdb │ │ └── winmain.obj │ ├── Game.dsp │ ├── Game.dsw │ ├── Game.ncb │ ├── Game.opt │ ├── Game.plg │ ├── Game.sln │ ├── Game.suo │ ├── Game.vcproj │ ├── Release │ │ ├── BuildLog.htm │ │ ├── Game.exe.intermediate.manifest │ │ ├── d3dlib.obj │ │ ├── vc90.idb │ │ └── winmain.obj │ ├── d3dlib.cpp │ ├── d3dlib.h │ ├── demoimage │ │ └── Teapot.png │ ├── winmain.cpp │ └── winmain.h ├── Effect │ ├── Bleach.jpg │ ├── Debug │ │ ├── BuildLog.htm │ │ ├── Game.exe │ │ ├── Game.exe.embed.manifest │ │ ├── Game.exe.embed.manifest.res │ │ ├── Game.exe.intermediate.manifest │ │ ├── Game.ilk │ │ ├── Game.pdb │ │ ├── d3dlib.obj │ │ ├── mt.dep │ │ ├── vc90.idb │ │ ├── vc90.pdb │ │ └── winmain.obj │ ├── Effect.txt │ ├── Game.dsp │ ├── Game.dsw │ ├── Game.ncb │ ├── Game.opt │ ├── Game.plg │ ├── Game.sln │ ├── Game.suo │ ├── Game.vcproj │ ├── Release │ │ ├── BuildLog.htm │ │ ├── Game.exe.intermediate.manifest │ │ ├── d3dlib.obj │ │ ├── vc90.idb │ │ └── winmain.obj │ ├── chopper.bmp │ ├── d3dlib.cpp │ ├── d3dlib.h │ ├── demoimage │ │ └── Effect.png │ ├── winmain.cpp │ └── winmain.h ├── HLSL.pdf ├── PS │ ├── Debug │ │ ├── BuildLog.htm │ │ ├── Game.exe │ │ ├── Game.exe.embed.manifest │ │ ├── Game.exe.embed.manifest.res │ │ ├── Game.exe.intermediate.manifest │ │ ├── Game.ilk │ │ ├── Game.pdb │ │ ├── d3dlib.obj │ │ ├── mt.dep │ │ ├── vc90.idb │ │ ├── vc90.pdb │ │ └── winmain.obj │ ├── Game.dsp │ ├── Game.dsw │ ├── Game.ncb │ ├── Game.opt │ ├── Game.plg │ ├── Game.sln │ ├── Game.suo │ ├── Game.vcproj │ ├── Release │ │ ├── BuildLog.htm │ │ ├── Game.exe.intermediate.manifest │ │ ├── d3dlib.obj │ │ ├── vc90.idb │ │ └── winmain.obj │ ├── d3dlib.cpp │ ├── d3dlib.h │ ├── demoimage │ │ └── PS.png │ ├── luoqi.jpg │ ├── porpcart.jpg │ ├── ps.txt │ ├── winmain.cpp │ └── winmain.h ├── README.md └── VS │ ├── Debug │ ├── BuildLog.htm │ ├── Game.exe │ ├── Game.exe.embed.manifest │ ├── Game.exe.embed.manifest.res │ ├── Game.exe.intermediate.manifest │ ├── Game.ilk │ ├── Game.pdb │ ├── d3dlib.obj │ ├── mt.dep │ ├── vc90.idb │ ├── vc90.pdb │ └── winmain.obj │ ├── Dolphin1.x │ ├── Dolphin3.x │ ├── Game.dsp │ ├── Game.dsw │ ├── Game.ncb │ ├── Game.opt │ ├── Game.plg │ ├── Game.sln │ ├── Game.suo │ ├── Game.vcproj │ ├── d3dlib.cpp │ ├── d3dlib.h │ ├── demoimage │ └── VS.png │ ├── dolphin.bmp │ ├── vs.txt │ ├── winmain.cpp │ └── winmain.h ├── Notes ├── CompileShaderFromFile function │ └── README.md ├── LUT │ ├── README.md │ ├── cube-lut-specification-1.0.pdf │ └── demo │ │ └── 1_SGamut3CineSLog3_To_LC-709.cube └── UpdateSubresource function │ ├── README.md │ ├── Row_Depth_Pitch.png │ └── test.cpp └── README.md /DirectX_Tutorial/README.md: -------------------------------------------------------------------------------- 1 | ## DirectX11 官方教程 2 | 注:本教程上的代码可在 VS2008和 VS2010中运行。 3 | - 01:基础; 4 | - 02:基本框架; 5 | - 03:shader编程; 6 | - 04:3D场景; 7 | - 05:3D转换; 8 | - 06:光照; 9 | - 07:纹理贴图和恒定的缓冲区; 10 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial01.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/Tutorial01.aps -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/Tutorial01.cpp -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/Tutorial01.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial01 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial01" 111 | IDS_APP_TITLE "Tutorial01" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01_2008.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/Tutorial01_2008.ncb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial01", "Tutorial01_2008.vcproj", "{06EDC280-1187-4614-A248-E640C095FA6B}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|Win32.Build.0 = Debug|Win32 17 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|x64.ActiveCfg = Debug|x64 18 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|x64.Build.0 = Debug|x64 19 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|Win32.Build.0 = Profile|Win32 21 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|x64.ActiveCfg = Profile|x64 22 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|x64.Build.0 = Profile|x64 23 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|Win32.ActiveCfg = Release|Win32 24 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|Win32.Build.0 = Release|Win32 25 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|x64.ActiveCfg = Release|x64 26 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01_2008.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/Tutorial01_2008.suo -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial01", "Tutorial01_2010.vcxproj", "{06EDC280-1187-4614-A248-E640C095FA6B}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|Win32.Build.0 = Debug|Win32 17 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|x64.ActiveCfg = Debug|x64 18 | {06EDC280-1187-4614-A248-E640C095FA6B}.Debug|x64.Build.0 = Debug|x64 19 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|Win32.Build.0 = Profile|Win32 21 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|x64.ActiveCfg = Profile|x64 22 | {06EDC280-1187-4614-A248-E640C095FA6B}.Profile|x64.Build.0 = Profile|x64 23 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|Win32.ActiveCfg = Release|Win32 24 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|Win32.Build.0 = Release|Win32 25 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|x64.ActiveCfg = Release|x64 26 | {06EDC280-1187-4614-A248-E640C095FA6B}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/Tutorial01_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Resource Files 21 | 22 | 23 | Resource Files 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/BuildLog.htm -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.exe -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.obj -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/Tutorial01.res -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/mt.dep -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/vc90.idb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial01/x64/Release/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial01/x64/Release/vc90.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial02.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/Tutorial02.cpp -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02.fx: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // File: Tutorial02.fx 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | //-------------------------------------------------------------------------------------- 6 | 7 | //-------------------------------------------------------------------------------------- 8 | // Vertex Shader 9 | //-------------------------------------------------------------------------------------- 10 | float4 VS( float4 Pos : POSITION ) : SV_POSITION 11 | { 12 | return Pos; 13 | } 14 | 15 | 16 | //-------------------------------------------------------------------------------------- 17 | // Pixel Shader 18 | //-------------------------------------------------------------------------------------- 19 | float4 PS( float4 Pos : SV_POSITION ) : SV_Target 20 | { 21 | return float4( 1.0f, 1.0f, 0.0f, 1.0f ); // Yellow, with Alpha = 1 22 | } 23 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/Tutorial02.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial02 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial02" 111 | IDS_APP_TITLE "Tutorial02" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02_2008.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/Tutorial02_2008.ncb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial02", "Tutorial02_2008.vcproj", "{28877253-3120-4098-86B8-BAAC1C0AF240}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|Win32.Build.0 = Debug|Win32 17 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|x64.ActiveCfg = Debug|x64 18 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|x64.Build.0 = Debug|x64 19 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|Win32.Build.0 = Profile|Win32 21 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|x64.ActiveCfg = Profile|x64 22 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|x64.Build.0 = Profile|x64 23 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|Win32.ActiveCfg = Release|Win32 24 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|Win32.Build.0 = Release|Win32 25 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|x64.ActiveCfg = Release|x64 26 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02_2008.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/Tutorial02_2008.suo -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial02", "Tutorial02_2010.vcxproj", "{28877253-3120-4098-86B8-BAAC1C0AF240}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|Win32.Build.0 = Debug|Win32 17 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|x64.ActiveCfg = Debug|x64 18 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Debug|x64.Build.0 = Debug|x64 19 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|Win32.Build.0 = Profile|Win32 21 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|x64.ActiveCfg = Profile|x64 22 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Profile|x64.Build.0 = Profile|x64 23 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|Win32.ActiveCfg = Release|Win32 24 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|Win32.Build.0 = Release|Win32 25 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|x64.ActiveCfg = Release|x64 26 | {28877253-3120-4098-86B8-BAAC1C0AF240}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/Tutorial02_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | {2c3d4c8c-5d1a-459a-a05a-a4e4b608a44e} 13 | fx;fxh;hlsl 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Shaders 23 | 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/BuildLog.htm -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.exe -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.obj -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/Tutorial02.res -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/mt.dep -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/vc90.idb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial02/x64/Release/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial02/x64/Release/vc90.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/BuildLog.htm -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/Tutorial03.exe -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.exe.embed.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | true 5 | 6 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.exe.embed.manifest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/Tutorial03.exe.embed.manifest.res -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/Tutorial03.ilk -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/Tutorial03.obj -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/Tutorial03.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/Tutorial03.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/Tutorial03.res -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/mt.dep -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/vc90.idb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Debug/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Debug/vc90.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial03.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03.fx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Tutorial03.fx -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Tutorial03.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial03 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial03" 111 | IDS_APP_TITLE "Tutorial03" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03_2008.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Tutorial03_2008.ncb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial03", "Tutorial03_2008.vcproj", "{4D201D5F-2B78-4D13-9774-E77012EADEF1}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|Win32.Build.0 = Debug|Win32 17 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|x64.ActiveCfg = Debug|x64 18 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|x64.Build.0 = Debug|x64 19 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|Win32.Build.0 = Profile|Win32 21 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|x64.ActiveCfg = Profile|x64 22 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|x64.Build.0 = Profile|x64 23 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|Win32.ActiveCfg = Release|Win32 24 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|Win32.Build.0 = Release|Win32 25 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|x64.ActiveCfg = Release|x64 26 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03_2008.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/Tutorial03_2008.suo -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial03", "Tutorial03_2010.vcxproj", "{4D201D5F-2B78-4D13-9774-E77012EADEF1}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|Win32.Build.0 = Debug|Win32 17 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|x64.ActiveCfg = Debug|x64 18 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Debug|x64.Build.0 = Debug|x64 19 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|Win32.Build.0 = Profile|Win32 21 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|x64.ActiveCfg = Profile|x64 22 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Profile|x64.Build.0 = Profile|x64 23 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|Win32.ActiveCfg = Release|Win32 24 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|Win32.Build.0 = Release|Win32 25 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|x64.ActiveCfg = Release|x64 26 | {4D201D5F-2B78-4D13-9774-E77012EADEF1}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/Tutorial03_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | {2c3d4c8c-5d1a-459a-a05a-a4e4b608a44e} 13 | fx;fxh;hlsl 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Shaders 23 | 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/BuildLog.htm -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.exe -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.obj -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/Tutorial03.res -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/mt.dep -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/vc90.idb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial03/x64/Release/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial03/x64/Release/vc90.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial04/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial04.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Tutorial04.fx: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // File: Tutorial04.fx 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | //-------------------------------------------------------------------------------------- 6 | 7 | //-------------------------------------------------------------------------------------- 8 | // Constant Buffer Variables 9 | //-------------------------------------------------------------------------------------- 10 | cbuffer ConstantBuffer : register( b0 ) 11 | { 12 | matrix World; 13 | matrix View; 14 | matrix Projection; 15 | } 16 | 17 | //-------------------------------------------------------------------------------------- 18 | struct VS_OUTPUT 19 | { 20 | float4 Pos : SV_POSITION; 21 | float4 Color : COLOR0; 22 | }; 23 | 24 | //-------------------------------------------------------------------------------------- 25 | // Vertex Shader 26 | //-------------------------------------------------------------------------------------- 27 | VS_OUTPUT VS( float4 Pos : POSITION, float4 Color : COLOR ) 28 | { 29 | VS_OUTPUT output = (VS_OUTPUT)0; 30 | output.Pos = mul( Pos, World ); 31 | output.Pos = mul( output.Pos, View ); 32 | output.Pos = mul( output.Pos, Projection ); 33 | output.Color = Color; 34 | return output; 35 | } 36 | 37 | 38 | //-------------------------------------------------------------------------------------- 39 | // Pixel Shader 40 | //-------------------------------------------------------------------------------------- 41 | float4 PS( VS_OUTPUT input ) : SV_Target 42 | { 43 | return input.Color; 44 | } 45 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Tutorial04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial04/Tutorial04.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Tutorial04.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial04 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial04" 111 | IDS_APP_TITLE "Tutorial04" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Tutorial04_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial04", "Tutorial04_2008.vcproj", "{B8FF81B5-9B26-4931-8353-07795FDC4043}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|Win32.Build.0 = Debug|Win32 17 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|x64.ActiveCfg = Debug|x64 18 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|x64.Build.0 = Debug|x64 19 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|Win32.Build.0 = Profile|Win32 21 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|x64.ActiveCfg = Profile|x64 22 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|x64.Build.0 = Profile|x64 23 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|Win32.ActiveCfg = Release|Win32 24 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|Win32.Build.0 = Release|Win32 25 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|x64.ActiveCfg = Release|x64 26 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Tutorial04_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial04", "Tutorial04_2010.vcxproj", "{B8FF81B5-9B26-4931-8353-07795FDC4043}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|Win32.Build.0 = Debug|Win32 17 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|x64.ActiveCfg = Debug|x64 18 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Debug|x64.Build.0 = Debug|x64 19 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|Win32.Build.0 = Profile|Win32 21 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|x64.ActiveCfg = Profile|x64 22 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Profile|x64.Build.0 = Profile|x64 23 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|Win32.ActiveCfg = Release|Win32 24 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|Win32.Build.0 = Release|Win32 25 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|x64.ActiveCfg = Release|x64 26 | {B8FF81B5-9B26-4931-8353-07795FDC4043}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/Tutorial04_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | {2c3d4c8c-5d1a-459a-a05a-a4e4b608a44e} 13 | fx;fxh;hlsl 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Shaders 23 | 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial04/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial04/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial05/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial05.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Tutorial05.fx: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // File: Tutorial05.fx 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | //-------------------------------------------------------------------------------------- 6 | 7 | //-------------------------------------------------------------------------------------- 8 | // Constant Buffer Variables 9 | //-------------------------------------------------------------------------------------- 10 | cbuffer ConstantBuffer : register( b0 ) 11 | { 12 | matrix World; 13 | matrix View; 14 | matrix Projection; 15 | } 16 | 17 | //-------------------------------------------------------------------------------------- 18 | struct VS_INPUT 19 | { 20 | float4 Pos : POSITION; 21 | float4 Color : COLOR; 22 | }; 23 | 24 | struct PS_INPUT 25 | { 26 | float4 Pos : SV_POSITION; 27 | float4 Color : COLOR; 28 | }; 29 | 30 | 31 | //-------------------------------------------------------------------------------------- 32 | // Vertex Shader 33 | //-------------------------------------------------------------------------------------- 34 | PS_INPUT VS( VS_INPUT input ) 35 | { 36 | PS_INPUT output = (PS_INPUT)0; 37 | output.Pos = mul( input.Pos, World ); 38 | output.Pos = mul( output.Pos, View ); 39 | output.Pos = mul( output.Pos, Projection ); 40 | output.Color = input.Color; 41 | 42 | return output; 43 | } 44 | 45 | 46 | //-------------------------------------------------------------------------------------- 47 | // Pixel Shader 48 | //-------------------------------------------------------------------------------------- 49 | float4 PS( PS_INPUT input) : SV_Target 50 | { 51 | return input.Color; 52 | } 53 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Tutorial05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial05/Tutorial05.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Tutorial05.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial05 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial05" 111 | IDS_APP_TITLE "Tutorial05" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Tutorial05_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial05", "Tutorial05_2008.vcproj", "{EA744FDE-6588-4AA7-94BA-318D00E409DC}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|Win32.Build.0 = Debug|Win32 17 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|x64.ActiveCfg = Debug|x64 18 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|x64.Build.0 = Debug|x64 19 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|Win32.Build.0 = Profile|Win32 21 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|x64.ActiveCfg = Profile|x64 22 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|x64.Build.0 = Profile|x64 23 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|Win32.ActiveCfg = Release|Win32 24 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|Win32.Build.0 = Release|Win32 25 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|x64.ActiveCfg = Release|x64 26 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Tutorial05_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial05", "Tutorial05_2010.vcxproj", "{EA744FDE-6588-4AA7-94BA-318D00E409DC}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|Win32.Build.0 = Debug|Win32 17 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|x64.ActiveCfg = Debug|x64 18 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Debug|x64.Build.0 = Debug|x64 19 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|Win32.Build.0 = Profile|Win32 21 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|x64.ActiveCfg = Profile|x64 22 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Profile|x64.Build.0 = Profile|x64 23 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|Win32.ActiveCfg = Release|Win32 24 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|Win32.Build.0 = Release|Win32 25 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|x64.ActiveCfg = Release|x64 26 | {EA744FDE-6588-4AA7-94BA-318D00E409DC}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/Tutorial05_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | {2c3d4c8c-5d1a-459a-a05a-a4e4b608a44e} 13 | fx;fxh;hlsl 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Shaders 23 | 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial05/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial05/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial06/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial06.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Tutorial06.fx: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // File: Tutorial06.fx 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | //-------------------------------------------------------------------------------------- 6 | 7 | 8 | //-------------------------------------------------------------------------------------- 9 | // Constant Buffer Variables 10 | //-------------------------------------------------------------------------------------- 11 | cbuffer ConstantBuffer : register( b0 ) 12 | { 13 | matrix World; 14 | matrix View; 15 | matrix Projection; 16 | float4 vLightDir[2]; 17 | float4 vLightColor[2]; 18 | float4 vOutputColor; 19 | } 20 | 21 | 22 | //-------------------------------------------------------------------------------------- 23 | struct VS_INPUT 24 | { 25 | float4 Pos : POSITION; 26 | float3 Norm : NORMAL; 27 | }; 28 | 29 | struct PS_INPUT 30 | { 31 | float4 Pos : SV_POSITION; 32 | float3 Norm : TEXCOORD0; 33 | }; 34 | 35 | 36 | //-------------------------------------------------------------------------------------- 37 | // Vertex Shader 38 | //-------------------------------------------------------------------------------------- 39 | PS_INPUT VS( VS_INPUT input ) 40 | { 41 | PS_INPUT output = (PS_INPUT)0; 42 | output.Pos = mul( input.Pos, World ); 43 | output.Pos = mul( output.Pos, View ); 44 | output.Pos = mul( output.Pos, Projection ); 45 | output.Norm = mul( input.Norm, World ); 46 | 47 | return output; 48 | } 49 | 50 | 51 | //-------------------------------------------------------------------------------------- 52 | // Pixel Shader 53 | //-------------------------------------------------------------------------------------- 54 | float4 PS( PS_INPUT input) : SV_Target 55 | { 56 | float4 finalColor = 0; 57 | 58 | //do NdotL lighting for 2 lights 59 | for(int i=0; i<2; i++) 60 | { 61 | finalColor += saturate( dot( (float3)vLightDir[i],input.Norm) * vLightColor[i] ); 62 | } 63 | finalColor.a = 1; 64 | return finalColor; 65 | } 66 | 67 | 68 | //-------------------------------------------------------------------------------------- 69 | // PSSolid - render a solid color 70 | //-------------------------------------------------------------------------------------- 71 | float4 PSSolid( PS_INPUT input) : SV_Target 72 | { 73 | return vOutputColor; 74 | } 75 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Tutorial06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial06/Tutorial06.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Tutorial06.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial06 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial06" 111 | IDS_APP_TITLE "Tutorial06" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Tutorial06_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial06", "Tutorial06_2008.vcproj", "{291B6A55-368E-4420-A0EB-FBE077B9F137}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|Win32.Build.0 = Debug|Win32 17 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|x64.ActiveCfg = Debug|x64 18 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|x64.Build.0 = Debug|x64 19 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|Win32.Build.0 = Profile|Win32 21 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|x64.ActiveCfg = Profile|x64 22 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|x64.Build.0 = Profile|x64 23 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|Win32.ActiveCfg = Release|Win32 24 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|Win32.Build.0 = Release|Win32 25 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|x64.ActiveCfg = Release|x64 26 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Tutorial06_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial06", "Tutorial06_2010.vcxproj", "{291B6A55-368E-4420-A0EB-FBE077B9F137}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|Win32.Build.0 = Debug|Win32 17 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|x64.ActiveCfg = Debug|x64 18 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Debug|x64.Build.0 = Debug|x64 19 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|Win32.Build.0 = Profile|Win32 21 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|x64.ActiveCfg = Profile|x64 22 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Profile|x64.Build.0 = Profile|x64 23 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|Win32.ActiveCfg = Release|Win32 24 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|Win32.Build.0 = Release|Win32 25 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|x64.ActiveCfg = Release|x64 26 | {291B6A55-368E-4420-A0EB-FBE077B9F137}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/Tutorial06_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | {2c3d4c8c-5d1a-459a-a05a-a4e4b608a44e} 13 | fx;fxh;hlsl 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Shaders 23 | 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial06/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial06/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Tutorial07.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_TUTORIAL1_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_TUTORIAL1 107 14 | #define IDI_SMALL 108 15 | #define IDC_TUTORIAL1 109 16 | #define IDC_MYICON 2 17 | #define IDC_STATIC -1 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | 23 | #define _APS_NO_MFC 130 24 | #define _APS_NEXT_RESOURCE_VALUE 129 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1000 27 | #define _APS_NEXT_SYMED_VALUE 110 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Tutorial07.fx: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // File: Tutorial07.fx 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | //-------------------------------------------------------------------------------------- 6 | 7 | //-------------------------------------------------------------------------------------- 8 | // Constant Buffer Variables 9 | //-------------------------------------------------------------------------------------- 10 | Texture2D txDiffuse : register( t0 ); 11 | SamplerState samLinear : register( s0 ); 12 | 13 | cbuffer cbNeverChanges : register( b0 ) 14 | { 15 | matrix View; 16 | }; 17 | 18 | cbuffer cbChangeOnResize : register( b1 ) 19 | { 20 | matrix Projection; 21 | }; 22 | 23 | cbuffer cbChangesEveryFrame : register( b2 ) 24 | { 25 | matrix World; 26 | float4 vMeshColor; 27 | }; 28 | 29 | 30 | //-------------------------------------------------------------------------------------- 31 | struct VS_INPUT 32 | { 33 | float4 Pos : POSITION; 34 | float2 Tex : TEXCOORD0; 35 | }; 36 | 37 | struct PS_INPUT 38 | { 39 | float4 Pos : SV_POSITION; 40 | float2 Tex : TEXCOORD0; 41 | }; 42 | 43 | 44 | //-------------------------------------------------------------------------------------- 45 | // Vertex Shader 46 | //-------------------------------------------------------------------------------------- 47 | PS_INPUT VS( VS_INPUT input ) 48 | { 49 | PS_INPUT output = (PS_INPUT)0; 50 | output.Pos = mul( input.Pos, World ); 51 | output.Pos = mul( output.Pos, View ); 52 | output.Pos = mul( output.Pos, Projection ); 53 | output.Tex = input.Tex; 54 | 55 | return output; 56 | } 57 | 58 | 59 | //-------------------------------------------------------------------------------------- 60 | // Pixel Shader 61 | //-------------------------------------------------------------------------------------- 62 | float4 PS( PS_INPUT input) : SV_Target 63 | { 64 | return txDiffuse.Sample( samLinear, input.Tex ) * vMeshColor; 65 | } 66 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Tutorial07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/Tutorial07.jpg -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Tutorial07.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #define APSTUDIO_HIDDEN_SYMBOLS 11 | #include "windows.h" 12 | #undef APSTUDIO_HIDDEN_SYMBOLS 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // 22 | // Icon 23 | // 24 | 25 | // Icon with lowest ID value placed first to ensure application icon 26 | // remains consistent on all systems. 27 | 28 | IDI_TUTORIAL1 ICON "directx.ico" 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // 32 | // Menu 33 | // 34 | 35 | IDC_TUTORIAL1 MENU 36 | BEGIN 37 | POPUP "&File" 38 | BEGIN 39 | MENUITEM "E&xit", IDM_EXIT 40 | END 41 | POPUP "&Help" 42 | BEGIN 43 | MENUITEM "&About ...", IDM_ABOUT 44 | END 45 | END 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Accelerator 51 | // 52 | 53 | IDC_TUTORIAL1 ACCELERATORS 54 | BEGIN 55 | "?", IDM_ABOUT, ASCII, ALT 56 | "/", IDM_ABOUT, ASCII, ALT 57 | END 58 | 59 | 60 | ///////////////////////////////////////////////////////////////////////////// 61 | // 62 | // Dialog 63 | // 64 | 65 | IDD_ABOUTBOX DIALOG 22, 17, 230, 75 66 | STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 67 | CAPTION "About" 68 | FONT 8, "System" 69 | BEGIN 70 | ICON IDI_TUTORIAL1,IDC_MYICON,14,9,16,16 71 | LTEXT "Tutorial07 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX 72 | LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8 73 | DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP 74 | END 75 | 76 | 77 | #ifdef APSTUDIO_INVOKED 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // 80 | // TEXTINCLUDE 81 | // 82 | 1 TEXTINCLUDE 83 | BEGIN 84 | "resource.h\0" 85 | END 86 | 87 | 2 TEXTINCLUDE 88 | BEGIN 89 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" 90 | "#include ""windows.h""\r\n" 91 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" 92 | "\0" 93 | END 94 | 95 | 3 TEXTINCLUDE 96 | BEGIN 97 | "\r\n" 98 | "\0" 99 | END 100 | 101 | #endif // APSTUDIO_INVOKED 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // String Table 106 | // 107 | 108 | STRINGTABLE 109 | BEGIN 110 | IDC_TUTORIAL1 "Tutorial07" 111 | IDS_APP_TITLE "Tutorial07" 112 | END 113 | 114 | #endif 115 | ///////////////////////////////////////////////////////////////////////////// 116 | 117 | 118 | 119 | #ifndef APSTUDIO_INVOKED 120 | ///////////////////////////////////////////////////////////////////////////// 121 | // 122 | // Generated from the TEXTINCLUDE 3 resource. 123 | // 124 | 125 | 126 | ///////////////////////////////////////////////////////////////////////////// 127 | #endif // not APSTUDIO_INVOKED 128 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Tutorial07_2008.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial07", "Tutorial07_2008.vcproj", "{D29C6982-A589-4081-89B1-91E78D7C41E2}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|Win32.Build.0 = Debug|Win32 17 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|x64.ActiveCfg = Debug|x64 18 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|x64.Build.0 = Debug|x64 19 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|Win32.Build.0 = Profile|Win32 21 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|x64.ActiveCfg = Profile|x64 22 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|x64.Build.0 = Profile|x64 23 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|Win32.ActiveCfg = Release|Win32 24 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|Win32.Build.0 = Release|Win32 25 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|x64.ActiveCfg = Release|x64 26 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Tutorial07_2010.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial07", "Tutorial07_2010.vcxproj", "{D29C6982-A589-4081-89B1-91E78D7C41E2}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Profile|Win32 = Profile|Win32 10 | Profile|x64 = Profile|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|Win32.Build.0 = Debug|Win32 17 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|x64.ActiveCfg = Debug|x64 18 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Debug|x64.Build.0 = Debug|x64 19 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|Win32.ActiveCfg = Profile|Win32 20 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|Win32.Build.0 = Profile|Win32 21 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|x64.ActiveCfg = Profile|x64 22 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Profile|x64.Build.0 = Profile|x64 23 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|Win32.ActiveCfg = Release|Win32 24 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|Win32.Build.0 = Release|Win32 25 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|x64.ActiveCfg = Release|x64 26 | {D29C6982-A589-4081-89B1-91E78D7C41E2}.Release|x64.Build.0 = Release|x64 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/Tutorial07_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {8e114980-c1a3-4ada-ad7c-83caadf5daeb} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 7 | 8 | 9 | {a43c5c25-0e86-4a20-b64a-883785ff74fd} 10 | 11 | 12 | {2c3d4c8c-5d1a-459a-a05a-a4e4b608a44e} 13 | fx;fxh;hlsl 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Shaders 23 | 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/directx.ico -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/seafloor.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/seafloor.dds -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/BuildLog.htm -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.exe -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.obj -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.pdb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/Tutorial07.res -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/mt.dep -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/vc90.idb -------------------------------------------------------------------------------- /DirectX_Tutorial/Tutorial07/x64/Release/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/DirectX_Tutorial/Tutorial07/x64/Release/vc90.pdb -------------------------------------------------------------------------------- /HLSL/BasicHLSL/BasicHLSL.txt: -------------------------------------------------------------------------------- 1 | // 2 | // BasicHLSL.txt 3 | // 4 | 5 | // 6 | // Global variable 7 | // 8 | 9 | matrix WVPMatrix; 10 | vector color; 11 | 12 | // 13 | // Structures 14 | // 15 | 16 | struct VS_INPUT 17 | { 18 | vector position : POSITION; 19 | }; 20 | 21 | struct VS_OUTPUT 22 | { 23 | vector position : POSITION; 24 | vector color : COLOR; 25 | }; 26 | 27 | // 28 | // Functions 29 | // 30 | 31 | VS_OUTPUT SetColor(VS_INPUT input) 32 | { 33 | VS_OUTPUT output = (VS_OUTPUT)0; 34 | 35 | output.position = mul(input.position, WVPMatrix); 36 | output.color = color; 37 | 38 | return output; 39 | } -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/Game.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/Game.exe -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/Game.exe.embed.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/Game.exe.embed.manifest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/Game.exe.embed.manifest.res -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/Game.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/Game.ilk -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/Game.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/Game.pdb -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/mt.dep -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/vc90.idb -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/vc90.pdb -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Debug/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Debug/winmain.obj -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Game" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=Game - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Game.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Game.mak" CFG="Game - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Game - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "Game - Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "Game - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "Release" 42 | # PROP Intermediate_Dir "Release" 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 46 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 47 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD BASE RSC /l 0x804 /d "NDEBUG" 49 | # ADD RSC /l 0x804 /d "NDEBUG" 50 | BSC32=bscmake.exe 51 | # ADD BASE BSC32 /nologo 52 | # ADD BSC32 /nologo 53 | LINK32=link.exe 54 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 55 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 56 | 57 | !ELSEIF "$(CFG)" == "Game - Win32 Debug" 58 | 59 | # PROP BASE Use_MFC 0 60 | # PROP BASE Use_Debug_Libraries 1 61 | # PROP BASE Output_Dir "Debug" 62 | # PROP BASE Intermediate_Dir "Debug" 63 | # PROP BASE Target_Dir "" 64 | # PROP Use_MFC 0 65 | # PROP Use_Debug_Libraries 1 66 | # PROP Output_Dir "Debug" 67 | # PROP Intermediate_Dir "Debug" 68 | # PROP Ignore_Export_Lib 0 69 | # PROP Target_Dir "" 70 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 71 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 72 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 73 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD BASE RSC /l 0x804 /d "_DEBUG" 75 | # ADD RSC /l 0x804 /d "_DEBUG" 76 | BSC32=bscmake.exe 77 | # ADD BASE BSC32 /nologo 78 | # ADD BSC32 /nologo 79 | LINK32=link.exe 80 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 81 | # ADD LINK32 d3d9.lib d3dx9.lib d3dxof.lib dxguid.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 82 | 83 | !ENDIF 84 | 85 | # Begin Target 86 | 87 | # Name "Game - Win32 Release" 88 | # Name "Game - Win32 Debug" 89 | # Begin Group "Source Files" 90 | 91 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 92 | # Begin Source File 93 | 94 | SOURCE=.\d3dlib.cpp 95 | # End Source File 96 | # Begin Source File 97 | 98 | SOURCE=.\winmain.cpp 99 | # End Source File 100 | # End Group 101 | # Begin Group "Header Files" 102 | 103 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 104 | # Begin Source File 105 | 106 | SOURCE=.\d3dlib.h 107 | # End Source File 108 | # Begin Source File 109 | 110 | SOURCE=.\winmain.h 111 | # End Source File 112 | # End Group 113 | # Begin Group "Resource Files" 114 | 115 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 116 | # End Group 117 | # End Target 118 | # End Project 119 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Game"=.\Game.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Game.ncb -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Game.opt -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: Game - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP56.tmp" with contents 10 | [ 11 | /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/Game.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 12 | "E:\myProject\BasicHLSL\Game\winmain.cpp" 13 | ] 14 | Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP56.tmp" 15 | Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP57.tmp" with contents 16 | [ 17 | d3d9.lib d3dx9.lib d3dxof.lib dxguid.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/Game.pdb" /debug /machine:I386 /out:"Debug/Game.exe" /pdbtype:sept 18 | .\Debug\d3dlib.obj 19 | .\Debug\winmain.obj 20 | ] 21 | Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP57.tmp" 22 |

Output Window

23 | Compiling... 24 | winmain.cpp 25 | Linking... 26 | 27 | 28 | 29 |

Results

30 | Game.exe - 0 error(s), 0 warning(s) 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game.vcproj", "{D6763CFF-3C2C-4785-85A0-F43FC47BC434}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {D6763CFF-3C2C-4785-85A0-F43FC47BC434}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {D6763CFF-3C2C-4785-85A0-F43FC47BC434}.Debug|Win32.Build.0 = Debug|Win32 14 | {D6763CFF-3C2C-4785-85A0-F43FC47BC434}.Release|Win32.ActiveCfg = Release|Win32 15 | {D6763CFF-3C2C-4785-85A0-F43FC47BC434}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Game.suo -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Game.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 27 | 30 | 33 | 36 | 39 | 48 | 63 | 66 | 71 | 74 | 87 | 90 | 93 | 96 | 101 | 104 | 107 | 110 | 111 | 121 | 124 | 127 | 130 | 133 | 142 | 157 | 160 | 165 | 168 | 179 | 182 | 185 | 188 | 193 | 196 | 199 | 202 | 203 | 204 | 205 | 206 | 207 | 211 | 214 | 217 | 221 | 222 | 225 | 229 | 230 | 231 | 234 | 237 | 241 | 242 | 245 | 249 | 250 | 251 | 252 | 256 | 259 | 260 | 263 | 264 | 265 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Release/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Release/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Release/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Release/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Release/vc90.idb -------------------------------------------------------------------------------- /HLSL/BasicHLSL/Release/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/Release/winmain.obj -------------------------------------------------------------------------------- /HLSL/BasicHLSL/d3dlib.cpp: -------------------------------------------------------------------------------- 1 | #include "winmain.h" 2 | #include "d3d9.h" 3 | #include "d3dx9.h" 4 | #include "d3dlib.h" 5 | 6 | #define ReleaseCOM(x) {if(x!=NULL) x->Release(); x=NULL;} 7 | 8 | LPDIRECT3D9 g_pD3D = NULL; // Used to create the D3DDevice 9 | LPDIRECT3DDEVICE9 g_pd3dDevice = NULL; // Our rendering device 10 | 11 | int D3D_Init() 12 | { 13 | if(NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) 14 | return 0; 15 | 16 | D3DPRESENT_PARAMETERS d3dpp; 17 | ZeroMemory( &d3dpp, sizeof(d3dpp) ); 18 | d3dpp.Windowed = TRUE; 19 | d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; 20 | d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; 21 | d3dpp.EnableAutoDepthStencil = TRUE; 22 | d3dpp.AutoDepthStencilFormat = D3DFMT_D16; 23 | 24 | if(FAILED(g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, 25 | D3DCREATE_SOFTWARE_VERTEXPROCESSING, 26 | &d3dpp, &g_pd3dDevice))) 27 | return 0; 28 | 29 | D3DXVECTOR3 vEyePt (0.0f, 3.0f,-5.0f); 30 | D3DXVECTOR3 vLookatPt(0.0f, 0.0f, 0.0f); 31 | D3DXVECTOR3 vUpVec (0.0f, 1.0f, 0.0f); 32 | D3DXMATRIXA16 matView; 33 | D3DXMatrixLookAtLH(&matView, &vEyePt, &vLookatPt, &vUpVec); 34 | g_pd3dDevice->SetTransform(D3DTS_VIEW, &matView); 35 | 36 | D3DXMATRIX matProj; 37 | D3DXMatrixPerspectiveFovLH(&matProj, D3DX_PI/4, 4.0f/3.0f, 1.0f, 1000.0f); 38 | g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &matProj); 39 | 40 | // Set the default render states 41 | g_pd3dDevice->SetRenderState(D3DRS_LIGHTING, FALSE); 42 | g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); 43 | g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); 44 | g_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); 45 | g_pd3dDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE); 46 | 47 | // Set the default texture stage states 48 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); 49 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); 50 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); 51 | 52 | // Set the default texture filters 53 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); 54 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); 55 | 56 | return 1; 57 | } 58 | 59 | int D3D_Uninit() 60 | { 61 | ReleaseCOM(g_pd3dDevice); 62 | ReleaseCOM(g_pD3D); 63 | 64 | return 1; 65 | } 66 | 67 | int Render() 68 | { 69 | // Clear the back buffer to a blue color 70 | g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(153,153,153), 1.0f, 0 ); 71 | 72 | // Begin the scene 73 | g_pd3dDevice->BeginScene(); 74 | 75 | // Rendering of scene objects happens here 76 | 77 | // End the scene 78 | g_pd3dDevice->EndScene(); 79 | 80 | g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); 81 | 82 | return 1; 83 | } 84 | -------------------------------------------------------------------------------- /HLSL/BasicHLSL/d3dlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYD3DLIB_H 2 | #define _MYD3DLIB_H 3 | 4 | extern LPDIRECT3D9 g_pD3D; // Used to create the D3DDevice 5 | extern LPDIRECT3DDEVICE9 g_pd3dDevice; // Our rendering device 6 | 7 | int D3D_Init(); 8 | int D3D_Uninit(); 9 | int Render(); 10 | 11 | #endif //_MYD3DLIB_H -------------------------------------------------------------------------------- /HLSL/BasicHLSL/demoimage/Teapot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/demoimage/Teapot.png -------------------------------------------------------------------------------- /HLSL/BasicHLSL/winmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/BasicHLSL/winmain.cpp -------------------------------------------------------------------------------- /HLSL/BasicHLSL/winmain.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYWINMAIN_H 2 | #define _MYWINMAIN_H 3 | 4 | #include 5 | 6 | extern HWND g_hWnd; 7 | extern HINSTANCE g_hInst; 8 | 9 | #endif //_MYWINMAIN_H -------------------------------------------------------------------------------- /HLSL/Effect/Bleach.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Bleach.jpg -------------------------------------------------------------------------------- /HLSL/Effect/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/Effect/Debug/Game.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/Game.exe -------------------------------------------------------------------------------- /HLSL/Effect/Debug/Game.exe.embed.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /HLSL/Effect/Debug/Game.exe.embed.manifest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/Game.exe.embed.manifest.res -------------------------------------------------------------------------------- /HLSL/Effect/Debug/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/Effect/Debug/Game.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/Game.ilk -------------------------------------------------------------------------------- /HLSL/Effect/Debug/Game.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/Game.pdb -------------------------------------------------------------------------------- /HLSL/Effect/Debug/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/Effect/Debug/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/mt.dep -------------------------------------------------------------------------------- /HLSL/Effect/Debug/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/vc90.idb -------------------------------------------------------------------------------- /HLSL/Effect/Debug/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/vc90.pdb -------------------------------------------------------------------------------- /HLSL/Effect/Debug/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Debug/winmain.obj -------------------------------------------------------------------------------- /HLSL/Effect/Effect.txt: -------------------------------------------------------------------------------- 1 | //--------------------------------------------- 2 | // VS 3 | //--------------------------------------------- 4 | matrix WVPMatrix; 5 | 6 | struct VS_INPUT 7 | { 8 | vector position : POSITION; 9 | float2 uvCoords0 : TEXCOORD0; 10 | float2 uvCoords1 : TEXCOORD1; 11 | }; 12 | 13 | struct VS_OUTPUT 14 | { 15 | vector position : POSITION; 16 | float2 uvCoords0 : TEXCOORD0; 17 | float2 uvCoords1 : TEXCOORD1; 18 | }; 19 | 20 | VS_OUTPUT VS_Main(VS_INPUT input) 21 | { 22 | VS_OUTPUT output = (VS_OUTPUT)0; 23 | 24 | output.position = mul(input.position, WVPMatrix); 25 | 26 | output.uvCoords0 = input.uvCoords0; 27 | output.uvCoords1 = input.uvCoords1; 28 | 29 | return output; 30 | } 31 | 32 | //--------------------------------------------- 33 | // PS 34 | //--------------------------------------------- 35 | vector Scalar; 36 | 37 | texture Tex0; 38 | texture Tex1; 39 | 40 | sampler Samp0 = 41 | sampler_state 42 | { 43 | Texture = ; 44 | MipFilter = LINEAR; 45 | MinFilter = LINEAR; 46 | MagFilter = LINEAR; 47 | }; 48 | 49 | sampler Samp1 = 50 | sampler_state 51 | { 52 | Texture = ; 53 | MipFilter = LINEAR; 54 | MinFilter = LINEAR; 55 | MagFilter = LINEAR; 56 | }; 57 | 58 | struct PS_INPUT 59 | { 60 | float2 uvCoords0 : TEXCOORD0; 61 | float2 uvCoords1 : TEXCOORD1; 62 | }; 63 | 64 | struct PS_OUTPUT 65 | { 66 | float4 Color : COLOR0; 67 | }; 68 | 69 | PS_OUTPUT PS_Main(PS_INPUT input) 70 | { 71 | PS_OUTPUT output = (PS_OUTPUT)0; 72 | output.Color = tex2D(Samp0, input.uvCoords0)*Scalar.x + tex2D(Samp1, input.uvCoords1)*Scalar.y; 73 | return output; 74 | } 75 | 76 | //--------------------------------------------- 77 | // effect 78 | //--------------------------------------------- 79 | technique T0 80 | { 81 | pass P0 82 | { 83 | vertexShader = compile vs_2_0 VS_Main(); 84 | pixelShader = compile ps_2_0 PS_Main(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /HLSL/Effect/Game.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Game" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=Game - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Game.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Game.mak" CFG="Game - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Game - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "Game - Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "Game - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "Release" 42 | # PROP Intermediate_Dir "Release" 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 46 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 47 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD BASE RSC /l 0x804 /d "NDEBUG" 49 | # ADD RSC /l 0x804 /d "NDEBUG" 50 | BSC32=bscmake.exe 51 | # ADD BASE BSC32 /nologo 52 | # ADD BSC32 /nologo 53 | LINK32=link.exe 54 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 55 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 56 | 57 | !ELSEIF "$(CFG)" == "Game - Win32 Debug" 58 | 59 | # PROP BASE Use_MFC 0 60 | # PROP BASE Use_Debug_Libraries 1 61 | # PROP BASE Output_Dir "Debug" 62 | # PROP BASE Intermediate_Dir "Debug" 63 | # PROP BASE Target_Dir "" 64 | # PROP Use_MFC 0 65 | # PROP Use_Debug_Libraries 1 66 | # PROP Output_Dir "Debug" 67 | # PROP Intermediate_Dir "Debug" 68 | # PROP Ignore_Export_Lib 0 69 | # PROP Target_Dir "" 70 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 71 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 72 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 73 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD BASE RSC /l 0x804 /d "_DEBUG" 75 | # ADD RSC /l 0x804 /d "_DEBUG" 76 | BSC32=bscmake.exe 77 | # ADD BASE BSC32 /nologo 78 | # ADD BSC32 /nologo 79 | LINK32=link.exe 80 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 81 | # ADD LINK32 d3d9.lib d3dx9.lib d3dxof.lib dxguid.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 82 | 83 | !ENDIF 84 | 85 | # Begin Target 86 | 87 | # Name "Game - Win32 Release" 88 | # Name "Game - Win32 Debug" 89 | # Begin Group "Source Files" 90 | 91 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 92 | # Begin Source File 93 | 94 | SOURCE=.\d3dlib.cpp 95 | # End Source File 96 | # Begin Source File 97 | 98 | SOURCE=.\winmain.cpp 99 | # End Source File 100 | # End Group 101 | # Begin Group "Header Files" 102 | 103 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 104 | # Begin Source File 105 | 106 | SOURCE=.\d3dlib.h 107 | # End Source File 108 | # Begin Source File 109 | 110 | SOURCE=.\winmain.h 111 | # End Source File 112 | # End Group 113 | # Begin Group "Resource Files" 114 | 115 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 116 | # End Group 117 | # End Target 118 | # End Project 119 | -------------------------------------------------------------------------------- /HLSL/Effect/Game.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Game"=.\Game.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /HLSL/Effect/Game.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Game.ncb -------------------------------------------------------------------------------- /HLSL/Effect/Game.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Game.opt -------------------------------------------------------------------------------- /HLSL/Effect/Game.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: Game - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | 10 | 11 | 12 |

Results

13 | Game.exe - 0 error(s), 0 warning(s) 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /HLSL/Effect/Game.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game.vcproj", "{4533D753-D309-4E3A-93D6-EFF6BA1A8C47}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {4533D753-D309-4E3A-93D6-EFF6BA1A8C47}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {4533D753-D309-4E3A-93D6-EFF6BA1A8C47}.Debug|Win32.Build.0 = Debug|Win32 14 | {4533D753-D309-4E3A-93D6-EFF6BA1A8C47}.Release|Win32.ActiveCfg = Release|Win32 15 | {4533D753-D309-4E3A-93D6-EFF6BA1A8C47}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /HLSL/Effect/Game.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Game.suo -------------------------------------------------------------------------------- /HLSL/Effect/Game.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 27 | 30 | 33 | 36 | 39 | 48 | 63 | 66 | 71 | 74 | 87 | 90 | 93 | 96 | 101 | 104 | 107 | 110 | 111 | 121 | 124 | 127 | 130 | 133 | 142 | 157 | 160 | 165 | 168 | 179 | 182 | 185 | 188 | 193 | 196 | 199 | 202 | 203 | 204 | 205 | 206 | 207 | 211 | 214 | 217 | 221 | 222 | 225 | 229 | 230 | 231 | 234 | 237 | 241 | 242 | 245 | 249 | 250 | 251 | 252 | 256 | 259 | 260 | 263 | 264 | 265 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /HLSL/Effect/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Release/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/Effect/Release/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/Effect/Release/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Release/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/Effect/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Release/vc90.idb -------------------------------------------------------------------------------- /HLSL/Effect/Release/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/Release/winmain.obj -------------------------------------------------------------------------------- /HLSL/Effect/chopper.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/chopper.bmp -------------------------------------------------------------------------------- /HLSL/Effect/d3dlib.cpp: -------------------------------------------------------------------------------- 1 | #include "winmain.h" 2 | #include "d3d9.h" 3 | #include "d3dx9.h" 4 | #include "d3dlib.h" 5 | 6 | #define ReleaseCOM(x) {if(x!=NULL) x->Release(); x=NULL;} 7 | 8 | LPDIRECT3D9 g_pD3D = NULL; // Used to create the D3DDevice 9 | LPDIRECT3DDEVICE9 g_pd3dDevice = NULL; // Our rendering device 10 | 11 | int D3D_Init() 12 | { 13 | if(NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) 14 | return 0; 15 | 16 | D3DPRESENT_PARAMETERS d3dpp; 17 | ZeroMemory( &d3dpp, sizeof(d3dpp) ); 18 | d3dpp.Windowed = TRUE; 19 | d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; 20 | d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; 21 | d3dpp.EnableAutoDepthStencil = TRUE; 22 | d3dpp.AutoDepthStencilFormat = D3DFMT_D16; 23 | 24 | if(FAILED(g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, 25 | D3DCREATE_SOFTWARE_VERTEXPROCESSING, 26 | &d3dpp, &g_pd3dDevice))) 27 | return 0; 28 | 29 | D3DXVECTOR3 vEyePt (0.0f, 0.0f, -1.0f); 30 | D3DXVECTOR3 vLookatPt(0.0f, 0.0f, 0.0f); 31 | D3DXVECTOR3 vUpVec (0.0f, 1.0f, 0.0f); 32 | D3DXMATRIXA16 matView; 33 | D3DXMatrixLookAtLH(&matView, &vEyePt, &vLookatPt, &vUpVec); 34 | g_pd3dDevice->SetTransform(D3DTS_VIEW, &matView); 35 | 36 | D3DXMATRIX matProj; 37 | D3DXMatrixPerspectiveFovLH(&matProj, D3DX_PI/4, 4.0f/3.0f, 1.0f, 1000.0f); 38 | g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &matProj); 39 | 40 | // Set the default render states 41 | g_pd3dDevice->SetRenderState(D3DRS_LIGHTING, FALSE); 42 | g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); 43 | g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); 44 | g_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); 45 | g_pd3dDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE); 46 | 47 | // Set the default texture stage states 48 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); 49 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); 50 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); 51 | 52 | // Set the default texture filters 53 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); 54 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); 55 | 56 | return 1; 57 | } 58 | 59 | int D3D_Uninit() 60 | { 61 | ReleaseCOM(g_pd3dDevice); 62 | ReleaseCOM(g_pD3D); 63 | 64 | return 1; 65 | } 66 | 67 | int Render() 68 | { 69 | // Clear the back buffer to a blue color 70 | g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(153,153,153), 1.0f, 0 ); 71 | 72 | // Begin the scene 73 | g_pd3dDevice->BeginScene(); 74 | 75 | // Rendering of scene objects happens here 76 | 77 | // End the scene 78 | g_pd3dDevice->EndScene(); 79 | 80 | g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); 81 | 82 | return 1; 83 | } 84 | -------------------------------------------------------------------------------- /HLSL/Effect/d3dlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYD3DLIB_H 2 | #define _MYD3DLIB_H 3 | 4 | extern LPDIRECT3D9 g_pD3D; // Used to create the D3DDevice 5 | extern LPDIRECT3DDEVICE9 g_pd3dDevice; // Our rendering device 6 | 7 | int D3D_Init(); 8 | int D3D_Uninit(); 9 | int Render(); 10 | 11 | #endif //_MYD3DLIB_H -------------------------------------------------------------------------------- /HLSL/Effect/demoimage/Effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/demoimage/Effect.png -------------------------------------------------------------------------------- /HLSL/Effect/winmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/Effect/winmain.cpp -------------------------------------------------------------------------------- /HLSL/Effect/winmain.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYWINMAIN_H 2 | #define _MYWINMAIN_H 3 | 4 | #include 5 | 6 | extern HWND g_hWnd; 7 | extern HINSTANCE g_hInst; 8 | 9 | #endif //_MYWINMAIN_H -------------------------------------------------------------------------------- /HLSL/HLSL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/HLSL.pdf -------------------------------------------------------------------------------- /HLSL/PS/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/PS/Debug/Game.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/Game.exe -------------------------------------------------------------------------------- /HLSL/PS/Debug/Game.exe.embed.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /HLSL/PS/Debug/Game.exe.embed.manifest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/Game.exe.embed.manifest.res -------------------------------------------------------------------------------- /HLSL/PS/Debug/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/PS/Debug/Game.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/Game.ilk -------------------------------------------------------------------------------- /HLSL/PS/Debug/Game.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/Game.pdb -------------------------------------------------------------------------------- /HLSL/PS/Debug/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/PS/Debug/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/mt.dep -------------------------------------------------------------------------------- /HLSL/PS/Debug/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/vc90.idb -------------------------------------------------------------------------------- /HLSL/PS/Debug/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/vc90.pdb -------------------------------------------------------------------------------- /HLSL/PS/Debug/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Debug/winmain.obj -------------------------------------------------------------------------------- /HLSL/PS/Game.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Game" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=Game - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Game.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Game.mak" CFG="Game - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Game - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "Game - Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "Game - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "Release" 42 | # PROP Intermediate_Dir "Release" 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 46 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 47 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD BASE RSC /l 0x804 /d "NDEBUG" 49 | # ADD RSC /l 0x804 /d "NDEBUG" 50 | BSC32=bscmake.exe 51 | # ADD BASE BSC32 /nologo 52 | # ADD BSC32 /nologo 53 | LINK32=link.exe 54 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 55 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 56 | 57 | !ELSEIF "$(CFG)" == "Game - Win32 Debug" 58 | 59 | # PROP BASE Use_MFC 0 60 | # PROP BASE Use_Debug_Libraries 1 61 | # PROP BASE Output_Dir "Debug" 62 | # PROP BASE Intermediate_Dir "Debug" 63 | # PROP BASE Target_Dir "" 64 | # PROP Use_MFC 0 65 | # PROP Use_Debug_Libraries 1 66 | # PROP Output_Dir "Debug" 67 | # PROP Intermediate_Dir "Debug" 68 | # PROP Ignore_Export_Lib 0 69 | # PROP Target_Dir "" 70 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 71 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 72 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 73 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD BASE RSC /l 0x804 /d "_DEBUG" 75 | # ADD RSC /l 0x804 /d "_DEBUG" 76 | BSC32=bscmake.exe 77 | # ADD BASE BSC32 /nologo 78 | # ADD BSC32 /nologo 79 | LINK32=link.exe 80 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 81 | # ADD LINK32 d3d9.lib d3dx9.lib d3dxof.lib dxguid.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 82 | 83 | !ENDIF 84 | 85 | # Begin Target 86 | 87 | # Name "Game - Win32 Release" 88 | # Name "Game - Win32 Debug" 89 | # Begin Group "Source Files" 90 | 91 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 92 | # Begin Source File 93 | 94 | SOURCE=.\d3dlib.cpp 95 | # End Source File 96 | # Begin Source File 97 | 98 | SOURCE=.\winmain.cpp 99 | # End Source File 100 | # End Group 101 | # Begin Group "Header Files" 102 | 103 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 104 | # Begin Source File 105 | 106 | SOURCE=.\d3dlib.h 107 | # End Source File 108 | # Begin Source File 109 | 110 | SOURCE=.\winmain.h 111 | # End Source File 112 | # End Group 113 | # Begin Group "Resource Files" 114 | 115 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 116 | # End Group 117 | # End Target 118 | # End Project 119 | -------------------------------------------------------------------------------- /HLSL/PS/Game.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Game"=.\Game.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /HLSL/PS/Game.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Game.ncb -------------------------------------------------------------------------------- /HLSL/PS/Game.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Game.opt -------------------------------------------------------------------------------- /HLSL/PS/Game.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: Game - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | 10 | 11 | 12 |

Results

13 | Game.exe - 0 error(s), 0 warning(s) 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /HLSL/PS/Game.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game.vcproj", "{A3F9D095-7776-464F-8309-344EF0F19BEA}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {A3F9D095-7776-464F-8309-344EF0F19BEA}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {A3F9D095-7776-464F-8309-344EF0F19BEA}.Debug|Win32.Build.0 = Debug|Win32 14 | {A3F9D095-7776-464F-8309-344EF0F19BEA}.Release|Win32.ActiveCfg = Release|Win32 15 | {A3F9D095-7776-464F-8309-344EF0F19BEA}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /HLSL/PS/Game.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Game.suo -------------------------------------------------------------------------------- /HLSL/PS/Game.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 27 | 30 | 33 | 36 | 39 | 48 | 63 | 66 | 71 | 74 | 87 | 90 | 93 | 96 | 101 | 104 | 107 | 110 | 111 | 121 | 124 | 127 | 130 | 133 | 142 | 157 | 160 | 165 | 168 | 179 | 182 | 185 | 188 | 193 | 196 | 199 | 202 | 203 | 204 | 205 | 206 | 207 | 211 | 214 | 217 | 221 | 222 | 225 | 229 | 230 | 231 | 234 | 237 | 241 | 242 | 245 | 249 | 250 | 251 | 252 | 256 | 259 | 260 | 263 | 264 | 265 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /HLSL/PS/Release/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Release/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/PS/Release/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/PS/Release/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Release/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/PS/Release/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Release/vc90.idb -------------------------------------------------------------------------------- /HLSL/PS/Release/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/Release/winmain.obj -------------------------------------------------------------------------------- /HLSL/PS/d3dlib.cpp: -------------------------------------------------------------------------------- 1 | #include "winmain.h" 2 | #include "d3d9.h" 3 | #include "d3dx9.h" 4 | #include "d3dlib.h" 5 | 6 | #define ReleaseCOM(x) {if(x!=NULL) x->Release(); x=NULL;} 7 | 8 | LPDIRECT3D9 g_pD3D = NULL; // Used to create the D3DDevice 9 | LPDIRECT3DDEVICE9 g_pd3dDevice = NULL; // Our rendering device 10 | 11 | int D3D_Init() 12 | { 13 | if(NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) 14 | return 0; 15 | 16 | D3DPRESENT_PARAMETERS d3dpp; 17 | ZeroMemory( &d3dpp, sizeof(d3dpp) ); 18 | d3dpp.Windowed = TRUE; 19 | d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; 20 | d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; 21 | d3dpp.EnableAutoDepthStencil = TRUE; 22 | d3dpp.AutoDepthStencilFormat = D3DFMT_D16; 23 | 24 | if(FAILED(g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, 25 | D3DCREATE_SOFTWARE_VERTEXPROCESSING, 26 | &d3dpp, &g_pd3dDevice))) 27 | return 0; 28 | 29 | D3DXVECTOR3 vEyePt (0.0f, 0.0f,-1.0f); 30 | D3DXVECTOR3 vLookatPt(0.0f, 0.0f, 0.0f); 31 | D3DXVECTOR3 vUpVec (0.0f, 1.0f, 0.0f); 32 | D3DXMATRIXA16 matView; 33 | D3DXMatrixLookAtLH(&matView, &vEyePt, &vLookatPt, &vUpVec); 34 | g_pd3dDevice->SetTransform(D3DTS_VIEW, &matView); 35 | 36 | D3DXMATRIX matProj; 37 | D3DXMatrixPerspectiveFovLH(&matProj, D3DX_PI/4, 4.0f/3.0f, 1.0f, 1000.0f); 38 | g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &matProj); 39 | 40 | // Set the default render states 41 | g_pd3dDevice->SetRenderState(D3DRS_LIGHTING, FALSE); 42 | g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); 43 | g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); 44 | g_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); 45 | g_pd3dDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE); 46 | 47 | // Set the default texture stage states 48 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); 49 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); 50 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); 51 | 52 | // Set the default texture filters 53 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); 54 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); 55 | 56 | return 1; 57 | } 58 | 59 | int D3D_Uninit() 60 | { 61 | ReleaseCOM(g_pd3dDevice); 62 | ReleaseCOM(g_pD3D); 63 | 64 | return 1; 65 | } 66 | 67 | int Render() 68 | { 69 | // Clear the back buffer to a blue color 70 | g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(153,153,153), 1.0f, 0 ); 71 | 72 | // Begin the scene 73 | g_pd3dDevice->BeginScene(); 74 | 75 | // Rendering of scene objects happens here 76 | 77 | // End the scene 78 | g_pd3dDevice->EndScene(); 79 | 80 | g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); 81 | 82 | return 1; 83 | } 84 | -------------------------------------------------------------------------------- /HLSL/PS/d3dlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYD3DLIB_H 2 | #define _MYD3DLIB_H 3 | 4 | extern LPDIRECT3D9 g_pD3D; // Used to create the D3DDevice 5 | extern LPDIRECT3DDEVICE9 g_pd3dDevice; // Our rendering device 6 | 7 | int D3D_Init(); 8 | int D3D_Uninit(); 9 | int Render(); 10 | 11 | #endif //_MYD3DLIB_H -------------------------------------------------------------------------------- /HLSL/PS/demoimage/PS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/demoimage/PS.png -------------------------------------------------------------------------------- /HLSL/PS/luoqi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/luoqi.jpg -------------------------------------------------------------------------------- /HLSL/PS/porpcart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/porpcart.jpg -------------------------------------------------------------------------------- /HLSL/PS/ps.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/ps.txt -------------------------------------------------------------------------------- /HLSL/PS/winmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/PS/winmain.cpp -------------------------------------------------------------------------------- /HLSL/PS/winmain.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYWINMAIN_H 2 | #define _MYWINMAIN_H 3 | 4 | #include 5 | 6 | extern HWND g_hWnd; 7 | extern HINSTANCE g_hInst; 8 | 9 | #endif //_MYWINMAIN_H -------------------------------------------------------------------------------- /HLSL/README.md: -------------------------------------------------------------------------------- 1 | ## HLSL语言初级教程 2 | 四个案例程序和一个HLSL入门教程讲解 3 | 注:教程作者是trcj。 4 | - BasicHLSL:HLSL基本框架; 5 | - Effect:Effect框架; 6 | - PS:像素着色器例子; 7 | - VS:顶点着色器例子; 8 | - HLSL.pdf:HLSL入门教程。 9 | -------------------------------------------------------------------------------- /HLSL/VS/Debug/BuildLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/BuildLog.htm -------------------------------------------------------------------------------- /HLSL/VS/Debug/Game.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/Game.exe -------------------------------------------------------------------------------- /HLSL/VS/Debug/Game.exe.embed.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /HLSL/VS/Debug/Game.exe.embed.manifest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/Game.exe.embed.manifest.res -------------------------------------------------------------------------------- /HLSL/VS/Debug/Game.exe.intermediate.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLSL/VS/Debug/Game.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/Game.ilk -------------------------------------------------------------------------------- /HLSL/VS/Debug/Game.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/Game.pdb -------------------------------------------------------------------------------- /HLSL/VS/Debug/d3dlib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/d3dlib.obj -------------------------------------------------------------------------------- /HLSL/VS/Debug/mt.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/mt.dep -------------------------------------------------------------------------------- /HLSL/VS/Debug/vc90.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/vc90.idb -------------------------------------------------------------------------------- /HLSL/VS/Debug/vc90.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/vc90.pdb -------------------------------------------------------------------------------- /HLSL/VS/Debug/winmain.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Debug/winmain.obj -------------------------------------------------------------------------------- /HLSL/VS/Game.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Game" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=Game - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Game.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Game.mak" CFG="Game - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Game - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "Game - Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "Game - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "Release" 42 | # PROP Intermediate_Dir "Release" 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 46 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 47 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD BASE RSC /l 0x804 /d "NDEBUG" 49 | # ADD RSC /l 0x804 /d "NDEBUG" 50 | BSC32=bscmake.exe 51 | # ADD BASE BSC32 /nologo 52 | # ADD BSC32 /nologo 53 | LINK32=link.exe 54 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 55 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 56 | 57 | !ELSEIF "$(CFG)" == "Game - Win32 Debug" 58 | 59 | # PROP BASE Use_MFC 0 60 | # PROP BASE Use_Debug_Libraries 1 61 | # PROP BASE Output_Dir "Debug" 62 | # PROP BASE Intermediate_Dir "Debug" 63 | # PROP BASE Target_Dir "" 64 | # PROP Use_MFC 0 65 | # PROP Use_Debug_Libraries 1 66 | # PROP Output_Dir "Debug" 67 | # PROP Intermediate_Dir "Debug" 68 | # PROP Ignore_Export_Lib 0 69 | # PROP Target_Dir "" 70 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 71 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 72 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 73 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD BASE RSC /l 0x804 /d "_DEBUG" 75 | # ADD RSC /l 0x804 /d "_DEBUG" 76 | BSC32=bscmake.exe 77 | # ADD BASE BSC32 /nologo 78 | # ADD BSC32 /nologo 79 | LINK32=link.exe 80 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 81 | # ADD LINK32 d3d9.lib d3dx9.lib d3dxof.lib dxguid.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 82 | 83 | !ENDIF 84 | 85 | # Begin Target 86 | 87 | # Name "Game - Win32 Release" 88 | # Name "Game - Win32 Debug" 89 | # Begin Group "Source Files" 90 | 91 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 92 | # Begin Source File 93 | 94 | SOURCE=.\d3dlib.cpp 95 | # End Source File 96 | # Begin Source File 97 | 98 | SOURCE=.\winmain.cpp 99 | # End Source File 100 | # End Group 101 | # Begin Group "Header Files" 102 | 103 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 104 | # Begin Source File 105 | 106 | SOURCE=.\d3dlib.h 107 | # End Source File 108 | # Begin Source File 109 | 110 | SOURCE=.\winmain.h 111 | # End Source File 112 | # End Group 113 | # Begin Group "Resource Files" 114 | 115 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 116 | # End Group 117 | # End Target 118 | # End Project 119 | -------------------------------------------------------------------------------- /HLSL/VS/Game.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Game"=.\Game.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /HLSL/VS/Game.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Game.ncb -------------------------------------------------------------------------------- /HLSL/VS/Game.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Game.opt -------------------------------------------------------------------------------- /HLSL/VS/Game.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: Game - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1A.tmp" with contents 10 | [ 11 | /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/Game.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 12 | "E:\myProject\VS\Game\d3dlib.cpp" 13 | ] 14 | Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1A.tmp" 15 | Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1B.tmp" with contents 16 | [ 17 | d3d9.lib d3dx9.lib d3dxof.lib dxguid.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/Game.pdb" /debug /machine:I386 /out:"Debug/Game.exe" /pdbtype:sept 18 | .\Debug\d3dlib.obj 19 | .\Debug\winmain.obj 20 | ] 21 | Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1B.tmp" 22 |

Output Window

23 | Compiling... 24 | d3dlib.cpp 25 | Linking... 26 | 27 | 28 | 29 |

Results

30 | Game.exe - 0 error(s), 0 warning(s) 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /HLSL/VS/Game.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game.vcproj", "{7ED4D935-4010-43CD-9F3C-F33E07FC19F6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {7ED4D935-4010-43CD-9F3C-F33E07FC19F6}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {7ED4D935-4010-43CD-9F3C-F33E07FC19F6}.Debug|Win32.Build.0 = Debug|Win32 14 | {7ED4D935-4010-43CD-9F3C-F33E07FC19F6}.Release|Win32.ActiveCfg = Release|Win32 15 | {7ED4D935-4010-43CD-9F3C-F33E07FC19F6}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /HLSL/VS/Game.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/Game.suo -------------------------------------------------------------------------------- /HLSL/VS/Game.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 27 | 30 | 33 | 36 | 39 | 48 | 63 | 66 | 71 | 74 | 87 | 90 | 93 | 96 | 101 | 104 | 107 | 110 | 111 | 121 | 124 | 127 | 130 | 133 | 142 | 157 | 160 | 165 | 168 | 179 | 182 | 185 | 188 | 193 | 196 | 199 | 202 | 203 | 204 | 205 | 206 | 207 | 211 | 214 | 217 | 221 | 222 | 225 | 229 | 230 | 231 | 234 | 237 | 241 | 242 | 245 | 249 | 250 | 251 | 252 | 256 | 259 | 260 | 263 | 264 | 265 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /HLSL/VS/d3dlib.cpp: -------------------------------------------------------------------------------- 1 | #include "winmain.h" 2 | #include "d3d9.h" 3 | #include "d3dx9.h" 4 | #include "d3dlib.h" 5 | 6 | #define ReleaseCOM(x) {if(x!=NULL) x->Release(); x=NULL;} 7 | 8 | LPDIRECT3D9 g_pD3D = NULL; // Used to create the D3DDevice 9 | LPDIRECT3DDEVICE9 g_pd3dDevice = NULL; // Our rendering device 10 | 11 | int D3D_Init() 12 | { 13 | if(NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) 14 | return 0; 15 | 16 | D3DPRESENT_PARAMETERS d3dpp; 17 | ZeroMemory( &d3dpp, sizeof(d3dpp) ); 18 | d3dpp.Windowed = TRUE; 19 | d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; 20 | d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; 21 | d3dpp.EnableAutoDepthStencil = TRUE; 22 | d3dpp.AutoDepthStencilFormat = D3DFMT_D16; 23 | 24 | if(FAILED(g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, 25 | D3DCREATE_SOFTWARE_VERTEXPROCESSING, 26 | &d3dpp, &g_pd3dDevice))) 27 | return 0; 28 | 29 | D3DXVECTOR3 vEyePt (0.0f, 3.0f,-700.0f); 30 | D3DXVECTOR3 vLookatPt(0.0f, 0.0f, 0.0f); 31 | D3DXVECTOR3 vUpVec (0.0f, 1.0f, 0.0f); 32 | D3DXMATRIXA16 matView; 33 | D3DXMatrixLookAtLH(&matView, &vEyePt, &vLookatPt, &vUpVec); 34 | g_pd3dDevice->SetTransform(D3DTS_VIEW, &matView); 35 | 36 | D3DXMATRIX matProj; 37 | D3DXMatrixPerspectiveFovLH(&matProj, D3DX_PI/4, 4.0f/3.0f, 1.0f, 1000.0f); 38 | g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &matProj); 39 | 40 | // Set the default render states 41 | g_pd3dDevice->SetRenderState(D3DRS_LIGHTING, FALSE); 42 | g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); 43 | g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); 44 | g_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); 45 | g_pd3dDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE); 46 | 47 | // Set the default texture stage states 48 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); 49 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); 50 | g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); 51 | 52 | // Set the default texture filters 53 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); 54 | g_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); 55 | 56 | return 1; 57 | } 58 | 59 | int D3D_Uninit() 60 | { 61 | ReleaseCOM(g_pd3dDevice); 62 | ReleaseCOM(g_pD3D); 63 | 64 | return 1; 65 | } 66 | 67 | int Render() 68 | { 69 | // Clear the back buffer to a blue color 70 | g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,64), 1.0f, 0 ); 71 | 72 | // Begin the scene 73 | g_pd3dDevice->BeginScene(); 74 | 75 | // Rendering of scene objects happens here 76 | 77 | // End the scene 78 | g_pd3dDevice->EndScene(); 79 | 80 | g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); 81 | 82 | return 1; 83 | } 84 | -------------------------------------------------------------------------------- /HLSL/VS/d3dlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYD3DLIB_H 2 | #define _MYD3DLIB_H 3 | 4 | extern LPDIRECT3D9 g_pD3D; // Used to create the D3DDevice 5 | extern LPDIRECT3DDEVICE9 g_pd3dDevice; // Our rendering device 6 | 7 | int D3D_Init(); 8 | int D3D_Uninit(); 9 | int Render(); 10 | 11 | #endif //_MYD3DLIB_H -------------------------------------------------------------------------------- /HLSL/VS/demoimage/VS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/demoimage/VS.png -------------------------------------------------------------------------------- /HLSL/VS/dolphin.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/dolphin.bmp -------------------------------------------------------------------------------- /HLSL/VS/vs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/vs.txt -------------------------------------------------------------------------------- /HLSL/VS/winmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/HLSL/VS/winmain.cpp -------------------------------------------------------------------------------- /HLSL/VS/winmain.h: -------------------------------------------------------------------------------- 1 | #ifndef _MYWINMAIN_H 2 | #define _MYWINMAIN_H 3 | 4 | #include 5 | 6 | extern HWND g_hWnd; 7 | extern HINSTANCE g_hInst; 8 | 9 | #endif //_MYWINMAIN_H -------------------------------------------------------------------------------- /Notes/CompileShaderFromFile function/README.md: -------------------------------------------------------------------------------- 1 | ## D3DXCompileShaderFromFile function 2 | 3 | ```C++ 4 | HRESULT D3DXCompileShaderFromFile( 5 | _In_ LPCTSTR pSrcFile, //指向指定文件名的字符串的指针。 6 | _In_ const D3DXMACRO *pDefines, //D3DXMACRO结构的可选零端数组。这个值可能为空。 7 | _In_ LPD3DXINCLUDE pInclude, //可选接口指针,ID3DXInclude,用于处理#include指令。如果该值为空,那么从文件编译时将遵守#include,从资源或内存编译时将导致错误。 8 | _In_ LPCSTR pFunctionName, //指向执行开始的着色器入口点函数的指针。 9 | _In_ LPCSTR pProfile, //指向一个确定着色器指令集的着色器配置文件的指针。 10 | _In_ DWORD Flags, //编译由各种标志标识的选项。Direct3D 10 HLSL编译器现在是默认的。 11 | _Out_ LPD3DXBUFFER *ppShader, //返回一个包含创建的着色器的缓冲区。这个缓冲区包含已编译的着色器代码,以及任何嵌入式调试和符号表信息。 12 | _Out_ LPD3DXBUFFER *ppErrorMsgs, //返回一个缓冲区,其中包含编译时遇到的错误和警告的列表。在调试模式下运行时,调试器会显示相同的消息。这个值可能为空。 13 | _Out_ LPD3DXCONSTANTTABLE *ppConstantTable //返回一个ID3DXConstantTable接口,可以用来访问着色器常量。这个值可以为空。 14 | ); 15 | ``` 16 | 17 | #### 参考资料 18 | [D3DXCompileShaderFromFile微软文档](https://docs.microsoft.com/zh-cn/windows/desktop/direct3d9/d3dxcompileshaderfromfile) -------------------------------------------------------------------------------- /Notes/LUT/README.md: -------------------------------------------------------------------------------- 1 | ## LUT 2 | LUT全称look-up-table(显示查找表),LUT本质上就是一个RAM。 3 | 它把数据事先写入RAM后,每当输入一个信号就等于输入一个地址进行查表,找出地址对应的内容,然后输出。 4 | 5 | #### 作用 6 | - 校准显示:校准到监视器的色彩空间范围。 7 | 然而,lut所模拟的效果,只能作为参考,作为修图时的大致观感。最佳、最完整的呈现,仍然是显示器、显卡以及素材本身的各项指标高度一致,所谓“硬解码”; 8 | - 较色:直接添加LUT就能自动调节成一个较好的画面效果; 9 | - 白平衡处理:加载了白平衡LUT的色彩空间转换器以获得正常色彩关系的监看画面。 10 | 11 | #### 1D LUT 12 | gamma值,RGB平衡(灰阶)和白场。 13 | 14 | #### 3D LUTs 15 | 做颜色校准。 16 | 17 | 18 | #### 参考资料 19 | [LUT【显示查找表(Look-Up-Table)】--详解](http://zhan.renren.com/zmovieheaven?gid=3602888498061925025&checked=true) 20 | 21 | 22 | -------------------------------------------------------------------------------- /Notes/LUT/cube-lut-specification-1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/Notes/LUT/cube-lut-specification-1.0.pdf -------------------------------------------------------------------------------- /Notes/UpdateSubresource function/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/Notes/UpdateSubresource function/README.md -------------------------------------------------------------------------------- /Notes/UpdateSubresource function/Row_Depth_Pitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OctopusLian/LearnDirectX/04bbfc1296ae367f028f702d6b97f5495706ed8f/Notes/UpdateSubresource function/Row_Depth_Pitch.png -------------------------------------------------------------------------------- /Notes/UpdateSubresource function/test.cpp: -------------------------------------------------------------------------------- 1 | void UpdateSubresource( 2 | [in] ID3D11Resource *pDstResource, //指向目标资源的指针 3 | [in] UINT DstSubresource, //一个从零开始的索引,用来标识目标子资源 4 | [in] const D3D11_BOX *pDstBox, // 用来描述要覆盖目标的那个区域 5 | [in] const void *pSrcData, // 数据源,可以理解为内存 6 | [in] UINT SrcRowPitch, // 数据源行间距 7 | [in] UINT SrcDepthPitch // 数据源深度间距 8 | ); 9 | 10 | //test.cpp 11 | HRESULT CTex_DX11::LoadTex(const TP_BOX *pDstBox, const void *pSrcData, UINT SrcRowPitch, UINT SrcDepthPitch) //加载纹理 12 | { 13 | if (pDstBox==NULL || pSrcData==NULL) //如果覆盖目标区域或数据源为空 14 | return E_POINTER; 15 | ID3D11Device* pDevice = GetDevice11FromControlCenter(); 16 | if(!pDevice) //如果设备不存在 17 | return E_POINTER; 18 | 19 | ID3D11DeviceContext *pDeviceContext = NULL; 20 | pDevice->GetImmediateContext(&pDeviceContext); 21 | if (m_pTex==NULL || pDeviceContext==NULL) 22 | return E_POINTER; 23 | 24 | HRESULT hResult = S_OK; 25 | TP_D3D11TEXTURE_DESC desc; 26 | GetDesc(&desc); 27 | if (desc.eUsage==D3D11_USAGE_IMMUTABLE || (desc.uBindFlags&D3D11_BIND_DEPTH_STENCIL) || desc.uSampleCount>1) 28 | hResult = E_FAIL; 29 | else 30 | { 31 | D3D11_BOX box = {pDstBox->left, pDstBox->top, pDstBox->front, pDstBox->right, pDstBox->bottom, pDstBox->back}; //立方体的六个面 32 | pDeviceContext->UpdateSubresource(m_pTex, D3D11CalcSubresource(0,0,desc.uMipLevels), &box, pSrcData, SrcRowPitch, SrcDepthPitch); //&box为覆盖目标区域,uMipLevels给纹理加入层级 33 | pDeviceContext->Flush(); //更新 34 | } 35 | 36 | pDeviceContext->Release(); //释放 37 | return S_OK; 38 | } 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 学习DirectX 2 | 记录我学习DirectX做的实验,收获和踩过的坑。 3 | - DirectX_Tutorial:DirectX11 循序渐进的官方教程,带例子。 4 | - Notes:笔记。 5 | - HLSL:高阶着色器语言学习。 6 | --------------------------------------------------------------------------------