From 2ee6843cd916300c3ac0e158ac45ee97c1ce5beb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 13 Sep 2013 17:08:56 +0200 Subject: [PATCH] Fixes for d3d --- .../3d/driver/direct3d/driver_direct3d_pixel_program.cpp | 2 +- code/nel/src/3d/stereo_debugger.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp index 01d3c4844..1519a9554 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp @@ -57,7 +57,7 @@ CPixelProgramDrvInfosD3D::~CPixelProgramDrvInfosD3D() bool CDriverD3D::supportPixelProgram (CPixelProgram::TProfile profile) const { H_AUTO_D3D(CDriverD3D_supportPixelProgram_profile) - return ((profile & 0xFFFF0000) == 0xD3D00000) + return ((profile & 0xFFFF0000) == 0xD9020000) && (_PixelProgramVersion >= (uint16)(profile & 0x0000FFFF)); } diff --git a/code/nel/src/3d/stereo_debugger.cpp b/code/nel/src/3d/stereo_debugger.cpp index ccb2a6e96..74d8806f0 100644 --- a/code/nel/src/3d/stereo_debugger.cpp +++ b/code/nel/src/3d/stereo_debugger.cpp @@ -118,7 +118,6 @@ const char *a_ps_2_0 = "mov r0.yzw, r2\n" "cmp r0.x, -r0, r1, r2\n" "mov oC0, r0\n"; -; class CStereoDebuggerFactory : public IStereoDeviceFactory { @@ -155,7 +154,8 @@ CStereoDebugger::~CStereoDebugger() void CStereoDebugger::setDriver(NL3D::UDriver *driver) { nlassert(!m_PixelProgram); - + + m_Driver = driver; NL3D::IDriver *drvInternal = (static_cast(driver))->getDriver(); if (drvInternal->supportBloomEffect() && drvInternal->supportNonPowerOfTwoTextures()) @@ -179,6 +179,8 @@ void CStereoDebugger::setDriver(NL3D::UDriver *driver) } if (!drvInternal->compilePixelProgram(m_PixelProgram)) { + nlwarning("No supported pixel program for stereo debugger"); + delete m_PixelProgram; m_PixelProgram = NULL; } @@ -186,8 +188,6 @@ void CStereoDebugger::setDriver(NL3D::UDriver *driver) if (m_PixelProgram) { - m_Driver = driver; - initTextures(); m_Mat = m_Driver->createMaterial();