Occulus Rift DK2 [ALSO: OpenVR]

Materials, textures, lighting, postfx
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
89 posts Page 6 of 9
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Sun May 01, 2016 5:44 pm
Hey again,

The DK1 already works fine with my existing T3D build, which is based on 3.7.

I am planning to build a new EXE that will support the DK2/CV1, and include both EXE files with my distribution.

*** So my problem relates only to this new build I am doing using 3.8 and your OpenVr/DX11 Branch. ***

I have the DX11 code all integrated and it builds fine, but it crashes immediately on startup if I choose D3D11 as the video driver in the Options screen.

How are you all able to run DX11, if it crashes immediately? I have all the engine code merged correctly, and my game folder is updated with the latest shaders and the core directory, the game loads fine and runs great with DX9 video option set, but for DX11 it just crashes.

The console log clearly shows that when in DX11 it is not enumerating the supported video modes, comapred to DX9 where it gets past initialization fine. There must be something I missed somewhere, but I have no idea where. And since there are no errors and DX9 works fine, I am stumped.

Thinking it may be my project, I started a whole new project using the openvr repo download, but it won't compile for me, I get a bunch of unresolved externals.

Sigh, frustrated :( I have been using T3D for years now and consider myself to be a medium-level programmer, I have done dozens of mods and resources in my engine code without issue, but this DX11 appears to have no help or guidance or steps to take in order to get it working. I was hoping for some help.

Is there a DX11 thread somewhere that is useful and contains steps, etc to get it working? I can't find anything useful here to help me.

Is it supposed to be as simple as just including the DX11 folder under GFX, and then compiling? Because like I said that just crashes for me when I choose DX11 in the video options. Would like to test in the openvr build, just in case it is something with my project, but the openvr build does not compile for me, I get unresolved externals that I can't figure out.

Thanks in advance for any guidance you can provide.
P
MangoFusion
Posts: 50
Joined: Wed Feb 04, 2015 12:00 am
by MangoFusion » Mon May 02, 2016 12:09 am
Paul,

With all due respect I'm not a mind reader. When you say you get unresolved externals, how could I possibly help if I don't know what they are?

In any case I have put some binaries for the D3DTest example at https://drive.google.com/file/d/0B9SPZh ... sp=sharing - if those combined with the D3DTest game files dont work, my only guess would be your system or drivers doesn't support D3D11.

On my system everything loads in d3d11 mode - no crashes. To be quite honest I dont really have much in-depth knowledge of why the d3d11 adapter code could be failing besides the absolute basics. That's more Timmy's domain.
JeffR
Steering Committee
Steering Committee
Posts: 750
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Mon May 02, 2016 12:26 am
Paul:

Are you able to compile the current devhead without any unresolved externals? Not sure if you're running into DX11, or the VR stuff. May help to take a step back and affirm that devhead compiles and runs well, then we can see about walking through the merge of the WIP VR branch.

And as mango said, if you can get a copy of the errors/unresolved externals, that'd be a major help.
Azaezel
Posts: 383
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Mon May 02, 2016 12:35 am
@
User avatar
PaulWeston
: This is some deep, spiderwebby code we're talking here. Got a stack trace from a debug build to assist in narrowing down where there may be hiccups?

For instance, can already say you'll wanna doublecheck https://github.com/GarageGames/Torque3D ... #L300-L306 your end based just on the log, though obviously, rather doubtfull that'll have impact on the dx11 end...
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon May 02, 2016 1:04 am
My bad, of course I should have posted the compilation errors.

Here they are, using a fresh copy of the openvr_dx11 branch, with the D3d11 folder added in, all libs and includes pathed correctly for the VR/Oculus stuff, and the code compiles fine except for these unresolved externals:

1>gfxD3D11Device.obj : error LNK2019: unresolved external symbol CreateDXGIFactory1 referenced in function "private: virtual void __cdecl GFXD3D11Device::enumerateVideoModes(void)" (?enumerateVideoModes@GFXD3D11Device@@EEAAXXZ)
1>gfxD3D11Device.obj : error LNK2019: unresolved external symbol D3D11CreateDeviceAndSwapChain referenced in function "public: virtual void __cdecl GFXD3D11Device::init(struct GFXVideoMode const &,class PlatformWindow *)" (?init@GFXD3D11Device@@UEAAXAEBUGFXVideoMode@@PEAVPlatformWindow@@@Z)
1>gfxD3D11Device.obj : error LNK2019: unresolved external symbol D3DCompile referenced in function "public: virtual class GFXVertexDecl * __cdecl GFXD3D11Device::allocVertexDecl(class GFXVertexFormat const *)" (?allocVertexDecl@GFXD3D11Device@@UEAAPEAVGFXVertexDecl@@PEBVGFXVertexFormat@@@Z)
1>gfxD3D11Shader.obj : error LNK2001: unresolved external symbol D3DCompile
1>gfxD3D11Shader.obj : error LNK2019: unresolved external symbol D3DReflect referenced in function "protected: virtual bool __cdecl GFXD3D11Shader::_compileShader(class Torque::Path const &,class String const &,struct _D3D_SHADER_MACRO const *,class GenericConstBufferLayout *,class Vector<struct GFXShaderConstDesc> &)" (?_compileShader@GFXD3D11Shader@@MEAA_NAEBVPath@Torque@@AEBVString@@PEBU_D3D_SHADER_MACRO@@PEAVGenericConstBufferLayout@@AEAV?$Vector@UGFXShaderConstDesc@@@@@Z)
1>gfxD3D11Shader.obj : error LNK2019: unresolved external symbol D3DDisassemble referenced in function "protected: virtual bool __cdecl GFXD3D11Shader::_compileShader(class Torque::Path const &,class String const &,struct _D3D_SHADER_MACRO const *,class GenericConstBufferLayout *,class Vector<struct GFXShaderConstDesc> &)" (?_compileShader@GFXD3D11Shader@@MEAA_NAEBVPath@Torque@@AEBVString@@PEBU_D3D_SHADER_MACRO@@PEAVGenericConstBufferLayout@@AEAV?$Vector@UGFXShaderConstDesc@@@@@Z)
1>gfxD3D11Shader.obj : error LNK2019: unresolved external symbol D3DCreateBlob referenced in function "protected: virtual bool __cdecl GFXD3D11Shader::_compileShader(class Torque::Path const &,class String const &,struct _D3D_SHADER_MACRO const *,class GenericConstBufferLayout *,class Vector<struct GFXShaderConstDesc> &)" (?_compileShader@GFXD3D11Shader@@MEAA_NAEBVPath@Torque@@AEBVString@@PEBU_D3D_SHADER_MACRO@@PEAVGenericConstBufferLayout@@AEAV?$Vector@UGFXShaderConstDesc@@@@@Z)
1>gfxD3D9Shader.obj : error LNK2019: unresolved external symbol D3DXDisassembleShader referenced in function "protected: virtual bool __cdecl GFXD3D9Shader::_compileShader(class Torque::Path const &,class String const &,struct _D3DXMACRO const *,class GenericConstBufferLayout *,class GenericConstBufferLayout *,class Vector<struct GFXShaderConstDesc> &)" (?_compileShader@GFXD3D9Shader@@MEAA_NAEBVPath@Torque@@AEBVString@@PEBU_D3DXMACRO@@PEAVGenericConstBufferLayout@@3AEAV?$Vector@UGFXShaderConstDesc@@@@@Z)
1>gfxD3D9Shader.obj : error LNK2019: unresolved external symbol DXGetErrorStringA referenced in function "protected: virtual bool __cdecl GFXD3D9Shader::_compileShader(class Torque::Path const &,class String const &,struct _D3DXMACRO const *,class GenericConstBufferLayout *,class GenericConstBufferLayout *,class Vector<struct GFXShaderConstDesc> &)" (?_compileShader@GFXD3D9Shader@@MEAA_NAEBVPath@Torque@@AEBVString@@PEBU_D3DXMACRO@@PEAVGenericConstBufferLayout@@3AEAV?$Vector@UGFXShaderConstDesc@@@@@Z)
1>gfxD3D9Shader.obj : error LNK2019: unresolved external symbol DXGetErrorDescriptionA referenced in function "protected: virtual bool __cdecl GFXD3D9Shader::_compileShader(class Torque::Path const &,class String const &,struct _D3DXMACRO const *,class GenericConstBufferLayout *,class GenericConstBufferLayout *,class Vector<struct GFXShaderConstDesc> &)" (?_compileShader@GFXD3D9Shader@@MEAA_NAEBVPath@Torque@@AEBVString@@PEBU_D3DXMACRO@@PEAVGenericConstBufferLayout@@3AEAV?$Vector@UGFXShaderConstDesc@@@@@Z)
1>gfxD3D9TextureManager.obj : error LNK2019: unresolved external symbol D3DXLoadSurfaceFromMemory referenced in function "protected: virtual bool __cdecl GFXD3D9TextureManager::_loadTexture(class GFXTextureObject *,class GBitmap *)" (?_loadTexture@GFXD3D9TextureManager@@MEAA_NPEAVGFXTextureObject@@PEAVGBitmap@@@Z)
1>gfxPCD3D9Device.obj : error LNK2019: unresolved external symbol Direct3DCreate9 referenced in function "protected: static void __cdecl GFXPCD3D9Device::createDirect3D9(struct IDirect3D9 * &,struct IDirect3D9Ex * &)" (?createDirect3D9@GFXPCD3D9Device@@KAXAEAPEAUIDirect3D9@@AEAPEAUIDirect3D9Ex@@@Z)
1>gfxPCD3D9Device.obj : error LNK2019: unresolved external symbol D3DPERF_BeginEvent referenced in function "public: virtual void __cdecl GFXPCD3D9Device::enterDebugEvent(class ColorI,char const *)" (?enterDebugEvent@GFXPCD3D9Device@@UEAAXVColorI@@PEBD@Z)
1>gfxPCD3D9Device.obj : error LNK2019: unresolved external symbol D3DPERF_EndEvent referenced in function "public: virtual void __cdecl GFXPCD3D9Device::leaveDebugEvent(void)" (?leaveDebugEvent@GFXPCD3D9Device@@UEAAXXZ)
1>gfxPCD3D9Device.obj : error LNK2019: unresolved external symbol D3DPERF_SetMarker referenced in function "public: virtual void __cdecl GFXPCD3D9Device::setDebugMarker(class ColorI,char const *)" (?setDebugMarker@GFXPCD3D9Device@@UEAAXVColorI@@PEBD@Z)
1>sfxXAudioDevice.obj : error LNK2019: unresolved external symbol __imp_X3DAudioCalculate referenced in function "public: void __cdecl SFXXAudioDevice::_setOutputMatrix(class SFXXAudioVoice *)" (?_setOutputMatrix@SFXXAudioDevice@@QEAAXPEAVSFXXAudioVoice@@@Z)
1>sfxXAudioDevice.obj : error LNK2019: unresolved external symbol __imp_X3DAudioInitialize referenced in function "public: __cdecl SFXXAudioDevice::SFXXAudioDevice(class SFXProvider *,class String const &,struct IXAudio2 *,unsigned int,unsigned int,unsigned int)" (??0SFXXAudioDevice@@QEAA@PEAVSFXProvider@@AEBVString@@PEAUIXAudio2@@III@Z)
1>../../../game/D3DNewTest DLL.dll : fatal error LNK1120: 16 unresolved externals
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon May 02, 2016 1:10 am
And my own code (which is a merge of the openvr_dx11 with Azaezel's AFX_d3d11 branch, along with my own custom mods added in after for advanced character kit and a few others), compiles fine with no unresolved externals, functions great in DX9, but in DX11 crashes right away (see console log in the post a few entries up the thread).

As a side note, I see great improvements in the look of the rendering even when using DX9, going from 3.7 to this latest version. Here is a sample (3.7 on left, latest build on right):

Image

Image

I take it this is because of improved shaders and such? Nice work everyone, looks great :)


Will see if I can get a debug build going and get a stack trace for you, thanks!

P
Timmy
Posts: 308
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Mon May 02, 2016 1:21 am
The better look you are seeing with the textures is the proper gamma correction introduced with 3.9. Anyways onto your dx11 linker errors, what version of the DirectX SDK are you using there paul?
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon May 02, 2016 1:27 am
Well, that's the thing... I'm not sure if I have everything configured right, because I can't find a primer on how to set this up for DX11 :)

I know I have both SDKs installed in my system, both the original June 2009 that was used for Torque since forever, and then I have the Windows SDK 7.1. In my Visual Studio I am compiling using the Windows SDK 7.1 platform toolset.

But I am not sure if there is some other pathing I need to do, or configuration I need to change, to force it to DX11?

Thanks
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon May 02, 2016 1:30 am
My library directories setting in Visual Studio reads as follows:

$(DXSDK_DIR)\Lib\x64
$(WindowsSdkDir)lib\x64
$(VCInstallDir)lib\amd64
$(VSInstallDir)
$(VSInstallDir)lib\amd64

So, it looks like I am including both SDKs, but like I said I am just not sure 100% how this all works. I'm a script guy who tries hard to work the C code, I have done many engine mods before, it is always tricky for me but I usually prevail in the end :) But in this case I'm stumped.
Timmy
Posts: 308
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Mon May 02, 2016 1:43 am
Yeah unfortunately for now D3D9 uses the old deprecated D3Dx stuff that MS got rid off so we need to link to the old (again deprecated) DirectX SDK. You need the last version of that which was the June 2010 one. You can find that here https://www.microsoft.com/en-au/download/details.aspx?id=6812 . I have a new branch i am working on that corrects all this (actually removes D3D9 to be exact) but this will be introduced with T3D 4.0. For now unfortunately you have to put up with a lot of annoying compiler warnings. There is little documentation on all of this because 3.9 hasn't been officially released yet and we will be adding further docs when it is.
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
89 posts Page 6 of 9

Who is online

Users browsing this forum: No registered users and 1 guest