summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qxld3dtests.sln22
-rw-r--r--qxld3dtests/ReadMe.txt4
-rw-r--r--qxld3dtests/Resource.h31
-rw-r--r--qxld3dtests/qxld3dtests.cpp251
-rw-r--r--qxld3dtests/qxld3dtests.h3
-rw-r--r--qxld3dtests/qxld3dtests.icobin0 -> 2998 bytes
-rw-r--r--qxld3dtests/qxld3dtests.rcbin0 -> 6908 bytes
-rw-r--r--qxld3dtests/qxld3dtests.vcxproj105
-rw-r--r--qxld3dtests/qxld3dtests.vcxproj.filters55
-rw-r--r--qxld3dtests/small.icobin0 -> 2998 bytes
-rw-r--r--qxld3dtests/stdafx.cpp8
-rw-r--r--qxld3dtests/stdafx.h21
-rw-r--r--qxld3dtests/targetver.h8
13 files changed, 508 insertions, 0 deletions
diff --git a/qxld3dtests.sln b/qxld3dtests.sln
new file mode 100644
index 00000000..bbee7a61
--- /dev/null
+++ b/qxld3dtests.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30501.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxld3dtests", "qxld3dtests\qxld3dtests.vcxproj", "{B2D925BE-EFC9-4F66-AA84-944FE6F88288}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B2D925BE-EFC9-4F66-AA84-944FE6F88288}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B2D925BE-EFC9-4F66-AA84-944FE6F88288}.Debug|Win32.Build.0 = Debug|Win32
+ {B2D925BE-EFC9-4F66-AA84-944FE6F88288}.Release|Win32.ActiveCfg = Release|Win32
+ {B2D925BE-EFC9-4F66-AA84-944FE6F88288}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/qxld3dtests/ReadMe.txt b/qxld3dtests/ReadMe.txt
new file mode 100644
index 00000000..469caaba
--- /dev/null
+++ b/qxld3dtests/ReadMe.txt
@@ -0,0 +1,4 @@
+qxld3dtests.cpp
+- Uses d3d9d.dll directly to avoid need to have properly installed debug runtime (I couldn't get the directx control panel to do what it is supposed to do, which is toggle the runtime)
+- Based on the SDK tutorials
+- Used in conjunction with windbg in the guest with the accompanying batch file to launch it with preset breakpoints
diff --git a/qxld3dtests/Resource.h b/qxld3dtests/Resource.h
new file mode 100644
index 00000000..d8e2bf62
--- /dev/null
+++ b/qxld3dtests/Resource.h
@@ -0,0 +1,31 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by qxld3dtests.rc
+//
+
+#define IDS_APP_TITLE 103
+
+#define IDR_MAINFRAME 128
+#define IDD_QXLD3DTESTS_DIALOG 102
+#define IDD_ABOUTBOX 103
+#define IDM_ABOUT 104
+#define IDM_EXIT 105
+#define IDI_QXLD3DTESTS 107
+#define IDI_SMALL 108
+#define IDC_QXLD3DTESTS 109
+#define IDC_MYICON 2
+#ifndef IDC_STATIC
+#define IDC_STATIC -1
+#endif
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+
+#define _APS_NO_MFC 130
+#define _APS_NEXT_RESOURCE_VALUE 129
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 110
+#endif
+#endif
diff --git a/qxld3dtests/qxld3dtests.cpp b/qxld3dtests/qxld3dtests.cpp
new file mode 100644
index 00000000..1ee1d70e
--- /dev/null
+++ b/qxld3dtests/qxld3dtests.cpp
@@ -0,0 +1,251 @@
+#include <stdafx.h>
+
+// include the basic windows header files and the Direct3D header file
+#include <windows.h>
+#include <windowsx.h>
+
+#define D3D_DEBUG_INFO
+
+#include <d3d9.h>
+
+#include <stdio.h>
+
+// include the Direct3D Library file
+//#pragma comment (lib, "d3d9.lib")
+
+// global declarations
+LPDIRECT3D9 d3d; // the pointer to our Direct3D interface
+LPDIRECT3DDEVICE9 d3ddev; // the pointer to the device class
+
+// function prototypes
+bool initD3D(HWND hWnd); // sets up and initializes Direct3D
+void render_frame(void); // renders a single frame
+void cleanD3D(void); // closes Direct3D and releases memory
+
+// the WindowProc function prototype
+LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+
+extern "C"
+{
+ int WinMainCRTStartup(void); // Use the name you obtained in the prior step
+ int MyEntryPoint(void);
+}
+
+__declspec(noinline) int MyEntryPoint(void)
+{
+ // __debugbreak(); // Break into the program right at the entry point!
+ // Create a new console:
+ if (AttachConsole(ATTACH_PARENT_PROCESS) == 0) {
+ DWORD error = GetLastError();
+ if (error == ERROR_INVALID_HANDLE || error == ERROR_GEN_FAILURE) {
+ if (AllocConsole() == FALSE) {
+ // Bummer
+ return GetLastError();
+ }
+ }
+ else {
+ return error;
+ }
+ }
+ FILE *new_stdout;
+ FILE *new_stderr;
+ FILE *new_stdin;
+ freopen_s(&new_stdout, "CON", "w", stdout);
+ freopen_s(&new_stderr, "CON", "w", stderr);
+ freopen_s(&new_stdin, "CON", "r", stdin); // Note: "r", not "w".
+ return WinMainCRTStartup();
+}
+
+// the entry point for any Windows program
+int WINAPI WinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
+{
+ HWND hWnd;
+ WNDCLASSEX wc;
+ MSG msg = { 0 };
+
+ printf("program start\n");
+
+ ZeroMemory(&wc, sizeof(WNDCLASSEX));
+
+ wc.cbSize = sizeof(WNDCLASSEX);
+ wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = WindowProc;
+ wc.hInstance = hInstance;
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
+ wc.lpszClassName = L"WindowClass";
+
+ RegisterClassEx(&wc);
+
+ hWnd = CreateWindowEx(NULL,
+ L"WindowClass",
+ L"Our First Direct3D Program",
+ WS_OVERLAPPEDWINDOW,
+ 300, 300,
+ 800, 600,
+ NULL,
+ NULL,
+ hInstance,
+ NULL);
+
+ ShowWindow(hWnd, nCmdShow);
+
+ // set up and initialize Direct3D
+ if (!initD3D(hWnd)) {
+ goto error;
+ }
+
+ // enter the main loop:
+
+ while (TRUE)
+ {
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+
+ if (msg.message == WM_QUIT)
+ break;
+
+ render_frame();
+ }
+
+error:
+
+ // clean up DirectX and COM
+ cleanD3D();
+
+ return msg.wParam;
+}
+
+
+// this is the main message handler for the program
+LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_DESTROY:
+ {
+ PostQuitMessage(0);
+ return 0;
+ } break;
+ }
+
+ return DefWindowProc(hWnd, message, wParam, lParam);
+}
+
+typedef IDirect3D9 * (WINAPI *Direct3DCreate9_t)(UINT SDKVersion);
+
+struct CUSTOMVERTEX
+{
+ FLOAT x, y, z, rhw; // The transformed position for the vertex.
+ DWORD color; // The vertex color.
+};
+
+#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE)
+
+CUSTOMVERTEX vertices [] =
+{
+ { 150.0f, 50.0f, 0.5f, 1.0f, 0xffff0000, }, // x, y, z, rhw, color
+ { 250.0f, 250.0f, 0.5f, 1.0f, 0xff00ff00, },
+ { 50.0f, 250.0f, 0.5f, 1.0f, 0xff00ffff, },
+};
+
+IDirect3DVertexBuffer9 *g_pVB;
+
+// this function initializes and prepares Direct3D for use
+bool initD3D(HWND hWnd)
+{
+ HRESULT res;
+ D3DCAPS9 caps;
+ UINT adapter = D3DADAPTER_DEFAULT;
+ HINSTANCE d3d9d;
+ Direct3DCreate9_t Direct3DCreate9_cb;
+
+ // My hacky way of getting d3d9d.dll and not d3d9.dll - the direct X control panel for 2010 Jun fails to set 'd3d9 debug dll' on.
+ d3d9d = LoadLibrary(TEXT("d3d9d.dll"));
+ if (d3d9d == NULL) {
+ printf("shucks, nothing is working for you is it? go fishing\n");
+ return false;
+ }
+ Direct3DCreate9_cb = (Direct3DCreate9_t)GetProcAddress(d3d9d, "Direct3DCreate9");
+ if (Direct3DCreate9_cb == NULL) {
+ printf("not really fishing, just go away, come back when d3d landed in mesa\n");
+ return false;
+ }
+
+ d3d = (*Direct3DCreate9_cb)(D3D_SDK_VERSION); // create the Direct3D interface
+
+ D3DPRESENT_PARAMETERS d3dpp; // create a struct to hold various device information
+
+ res = d3d->GetDeviceCaps(adapter, D3DDEVTYPE_HAL, &caps);
+ printf("GetDeviceCaps: res=%d\n", res);
+ if (res != D3D_OK) {
+ return false;
+ }
+
+ if (d3d->CheckDeviceType(adapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DFMT_X8R8G8B8, TRUE) != D3D_OK) {
+ return false;
+ }
+
+ ZeroMemory(&d3dpp, sizeof(d3dpp)); // clear out the struct for use
+ d3dpp.Windowed = TRUE; // program windowed, not fullscreen
+ d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; // discard old frames
+ d3dpp.hDeviceWindow = hWnd; // set the window to be used by Direct3D
+
+
+ // create a device class using this information and the info from the d3dpp stuct
+ return D3D_OK == d3d->CreateDevice(adapter,
+ D3DDEVTYPE_HAL,
+ hWnd,
+ D3DCREATE_SOFTWARE_VERTEXPROCESSING,
+ &d3dpp,
+ &d3ddev);
+
+ if (FAILED(d3ddev->CreateVertexBuffer(3 * sizeof(CUSTOMVERTEX),
+ 0 /*Usage*/, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &g_pVB, NULL)))
+ return false;
+
+ VOID* pVertices;
+ if (FAILED(g_pVB->Lock(0, sizeof(vertices), (void**) &pVertices, 0)))
+ return false;
+
+ memcpy(pVertices, vertices, sizeof(vertices));
+
+ g_pVB->Unlock();
+}
+
+// this is the function used to render a single frame
+void render_frame(void)
+{
+ // clear the window to a deep blue
+ //d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 40, 100), 1.0f, 0);
+ d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 255), 1.0f, 0L);
+ d3ddev->BeginScene(); // begins the 3D scene
+
+ // do 3D rendering on the back buffer here
+
+ d3ddev->SetStreamSource(0, g_pVB, 0, sizeof(CUSTOMVERTEX));
+ d3ddev->SetFVF(D3DFVF_CUSTOMVERTEX);
+ d3ddev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 1);
+
+ d3ddev->EndScene(); // ends the 3D scene
+
+ d3ddev->Present(NULL, NULL, NULL, NULL); // displays the created frame on the screen
+}
+
+
+// this is the function that cleans up Direct3D and COM
+void cleanD3D(void)
+{
+ if (d3ddev) {
+ d3ddev->Release(); // close and release the 3D device
+ }
+ if (d3d) {
+ d3d->Release(); // close and release Direct3D
+ }
+} \ No newline at end of file
diff --git a/qxld3dtests/qxld3dtests.h b/qxld3dtests/qxld3dtests.h
new file mode 100644
index 00000000..d00d47e7
--- /dev/null
+++ b/qxld3dtests/qxld3dtests.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "resource.h"
diff --git a/qxld3dtests/qxld3dtests.ico b/qxld3dtests/qxld3dtests.ico
new file mode 100644
index 00000000..449296f4
--- /dev/null
+++ b/qxld3dtests/qxld3dtests.ico
Binary files differ
diff --git a/qxld3dtests/qxld3dtests.rc b/qxld3dtests/qxld3dtests.rc
new file mode 100644
index 00000000..14c1dc45
--- /dev/null
+++ b/qxld3dtests/qxld3dtests.rc
Binary files differ
diff --git a/qxld3dtests/qxld3dtests.vcxproj b/qxld3dtests/qxld3dtests.vcxproj
new file mode 100644
index 00000000..5acc9817
--- /dev/null
+++ b/qxld3dtests/qxld3dtests.vcxproj
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{B2D925BE-EFC9-4F66-AA84-944FE6F88288}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>qxld3dtests</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EntryPointSymbol>MyEntryPoint</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="qxld3dtests.h" />
+ <ClInclude Include="Resource.h" />
+ <ClInclude Include="stdafx.h" />
+ <ClInclude Include="targetver.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="qxld3dtests.cpp" />
+ <ClCompile Include="stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="qxld3dtests.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="qxld3dtests.ico" />
+ <Image Include="small.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/qxld3dtests/qxld3dtests.vcxproj.filters b/qxld3dtests/qxld3dtests.vcxproj.filters
new file mode 100644
index 00000000..c19e1555
--- /dev/null
+++ b/qxld3dtests/qxld3dtests.vcxproj.filters
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="targetver.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="qxld3dtests.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="qxld3dtests.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="qxld3dtests.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="small.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="qxld3dtests.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/qxld3dtests/small.ico b/qxld3dtests/small.ico
new file mode 100644
index 00000000..449296f4
--- /dev/null
+++ b/qxld3dtests/small.ico
Binary files differ
diff --git a/qxld3dtests/stdafx.cpp b/qxld3dtests/stdafx.cpp
new file mode 100644
index 00000000..9a08d753
--- /dev/null
+++ b/qxld3dtests/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// qxld3dtests.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/qxld3dtests/stdafx.h b/qxld3dtests/stdafx.h
new file mode 100644
index 00000000..bb80440e
--- /dev/null
+++ b/qxld3dtests/stdafx.h
@@ -0,0 +1,21 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+// C RunTime Header Files
+#include <stdlib.h>
+#include <malloc.h>
+#include <memory.h>
+#include <tchar.h>
+
+
+// TODO: reference additional headers your program requires here
diff --git a/qxld3dtests/targetver.h b/qxld3dtests/targetver.h
new file mode 100644
index 00000000..87c0086d
--- /dev/null
+++ b/qxld3dtests/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include <SDKDDKVer.h>