Commit 250f06c9 by baustin@google.com

Made it possible to turn off D3D9Ex support with a command-line compiler option.

The "Debug This Pixel..." feature in PIX often fails when using the D3D9Ex interfaces. In order to get debug pixel to work on a Vista/Win 7 machine, define "ANGLE_ENABLE_D3D9EX=0" in your project file. Review URL: http://codereview.appspot.com/4526106 git-svn-id: https://angleproject.googlecode.com/svn/trunk@672 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8106e870
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 671 #define BUILD_REVISION 672
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -18,8 +18,16 @@ ...@@ -18,8 +18,16 @@
#include "libEGL/main.h" #include "libEGL/main.h"
#define REF_RAST 0 // Can also be enabled by defining FORCE_REF_RAST in the project's predefined macros // Can also be enabled by defining FORCE_REF_RAST in the project's predefined macros
#define ENABLE_D3D9EX 1 // Enables use of the IDirect3D9Ex interface, when available #define REF_RAST 0
// The "Debug This Pixel..." feature in PIX often fails when using the
// D3D9Ex interfaces. In order to get debug pixel to work on a Vista/Win 7
// machine, define "ANGLE_ENABLE_D3D9EX=0" in your project file.
#if !defined(ANGLE_ENABLE_D3D9EX)
// Enables use of the IDirect3D9Ex interface, when available
#define ANGLE_ENABLE_D3D9EX 1
#endif // !defined(ANGLE_ENABLE_D3D9EX)
namespace egl namespace egl
{ {
...@@ -70,7 +78,7 @@ bool Display::initialize() ...@@ -70,7 +78,7 @@ bool Display::initialize()
// Use Direct3D9Ex if available. Among other things, this version is less // Use Direct3D9Ex if available. Among other things, this version is less
// inclined to report a lost context, for example when the user switches // inclined to report a lost context, for example when the user switches
// desktop. Direct3D9Ex is available in Windows Vista and later if suitable drivers are available. // desktop. Direct3D9Ex is available in Windows Vista and later if suitable drivers are available.
if (ENABLE_D3D9EX && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex))) if (ANGLE_ENABLE_D3D9EX && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex)))
{ {
ASSERT(mD3d9Ex); ASSERT(mD3d9Ex);
mD3d9Ex->QueryInterface(IID_IDirect3D9, reinterpret_cast<void**>(&mD3d9)); mD3d9Ex->QueryInterface(IID_IDirect3D9, reinterpret_cast<void**>(&mD3d9));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment