Page 5 of 6

Re: 3.10 Release Candidate

Posted: Thu Jan 12, 2017 10:05 pm
by JeffR
Currently, yeah, the older SDK is required. Ironically, not because of DirectX, but because of how MS decided to hatchet-job the audio dependencies with XAudio.

We're looking at how to resolve that what with dropping DX9 shortly after 3.10 goes out, but due to the knuckleheaded way Windows deals with the audio stuff, supporting XAudio at the moment with pre-8.1 windows necessitates the DX SDK.

Re: 3.10 Release Candidate

Posted: Fri Jan 13, 2017 2:54 pm
by Timmy
Hey, what's the procedure for making a DX11 build? I did a fresh update, and noted that TORQUE_D3D11 was checked in CMake, but when I tried to compile, it failed looking for D3D9.h. Do I need to uncheck DIRECTX at the same time as checking TORQUE_D3D11? (Testing that...)

EDIT: Nope, that didn't fix it either. Do I still need the DX9 SDK in order to build an exclusively DX11 executable?
Yes you still require the old june 2010 dx sdk unfortunately. Both the GFX D3D9 device and SFX XAudio device both depend on it. Just a small correction on the above, the xaudio thing is correct but also the current implementation of D3D9 gfx makes use of d3dx which MS removed when they released the windows sdk, since D3D9 is getting removed in 4.0 it made no sense to waste any time making the D3D9 gfx device work without d3dx (which is entirely possible to do). In 4.0 xaudio will be an opt in feature (i.e disabled by default) so by default the old june dx sdk will not be required unless you compile in xaudio support.

The problem with xaudio is version 2.7 requires the old june 2010 dx sdk and the windows sdk only supports xaudio 2.8+, Windows 7 only supports xaudio 2.7 and not 2.8. That presents a bit of a nightmare because xaudio 2.7 code is not completely compatible with 2.8, it requires changes to compile. So if we support only 2.7 we need to also support the old june 2010 dx sdk and if we only support 2.8 (with the windows sdk) than it won't work with windows 7. There are actually ways around this but it's not very nice, MS describe one way here using a hard coded path to the old june 2010 dx sdk ... windows-8/ for windows 7 builds. That is a nasty solution because it's a compile time solution and if you want to support windows 7 still (i'm sure most of us do), than you are stuck using the old june 2010 sdk. Hopefully all that makes sense. We have actually updated to using openal-soft recently so hopefully that suits everyone's sound needs ok and this xuadio thing is a total non issue ;)

Re: 3.10 Release Candidate

Posted: Fri Jan 13, 2017 5:56 pm
by chriscalef
Huh. Very interesting. Thanks again for all your hard work, Steering Committee! Speaking as just one T3D grunt out here on the front lines, I'd be completely screwed without you guys!!

Just to clarify though - if I hit the DirectX11 checkbox in CMake, and then compile it with the June 2010 SDK (which is no problem, btw, I don't mind a bit if it's just a compile issue) does that mean my build will run on an end user's machine without them having to download the DirectX 9 runtime?

This issue came up for me because I'm just starting to test my build outside my own machines (YAAAY!!!) and the second friend I had download it came up missing X3DAudio1_7.dll and D3DCOMPILER_43.dll. I've been assuming that was because I had a D3D9 build and he's never downloaded it. Is it possible that I just need to include those two dlls with my build? Or was my initial assumption correct and I need to build in D3D11 support, and then end users will not have to download anything because 11 is included in Windows?

Also, is it possible to support 9 and 11 at the same time in the same build, so users with older machines can still run it?

Re: 3.10 Release Candidate

Posted: Fri Jan 13, 2017 11:37 pm
by Timmy
Both D3D 9 & 11 require D3DCOMPILER_43.dll in T3D and yep D3D 9 & 11 can live happily in the same project, in fact currently there is no way of compiling out D3D9, so if you hit the D3D11 tick box in cmake you are including both. You can always double check with the exact dll's required.

Re: 3.10 Release Candidate

Posted: Sat Jan 14, 2017 6:39 pm
by chriscalef
Ah! Awesome, thanks for the info!

Re: 3.10 Release Candidate

Posted: Sat Jan 14, 2017 7:14 pm
by chriscalef
Does anybody know what's up with X3DAudio1_7.dll? I'm including it anyway, it's tiny, but is it from windows or directx?

Re: 3.10 Release Candidate

Posted: Mon Jan 16, 2017 12:38 am
by Happenstance
What's the status of the OpenGL layer on Windows? Would it be possible to rip out the DirectX layer (D3D9, 11, and XAudio) and just have a build that uses OpenGL and OpenAL on Windows? Am I correct in assuming the SDK wouldn't be required in that case?

Re: 3.10 Release Candidate

Posted: Tue Jan 17, 2017 3:40 pm
by JeffR
In the current build, D3D9 is the default graphics option and there isn't a simple flag to disable it, currently. Going forward to 4.0, 9 will be dropped in favor of 11(with feature support for 10).
So you'd need to disable some stuff in your project to make it agreeable on the win-side without DirectX, but as Linux and MacOS are both GL-only and run fine, yes, you could go pure OGL if you wanted with a bit of fiddling.

Re: 3.10 Release Candidate

Posted: Tue Jan 24, 2017 8:06 am
by JeffR
Hey guys, I think we're in the final stretch on this.

I'm trying to shore up 2 noted SDL issues(window edge snapping is weirdly offset, and some modifier key shenanigans).

If you guys could test these PRs and note any issues that crop up, that'd let me get them merged in so we can try getting a wrap on this:

Re: 3.10 Release Candidate

Posted: Fri Feb 03, 2017 9:58 pm
by TheMartian
Not sure how useful this is because I used the latest project manager v2.2 but I figured I would post it just in case.

Grabbing this 3.10rc code drop, unzipping, dropping in the built project manager, create a game using the full template, all default selections (maybe add minidump support)
Open in visual studio 2012 on a win10 machine and attempt to compile and link. Here is what you need to do to make it work.

In the DLL project.......
Cannot open include file nfd.h
need to add ................./Engine/lib/nativeFileDialogs/include to all configurations (prepend with where ever you have the files located)

Cannot open Al/Al.h
need to add ................/Engine/lib/openal-soft/include too all configurations (also prepend with where ever you have the files located)

Error 50 error C2039: 'smConnectionNotify' : is not a member of 'Net' \engine\source\platform\test\nettest.cpp 79

Need to change the net::smConnectionNotify.notify...... to Net::getConnectionNotifyEvent().notify....
for all instances.....


Net::smConnectionReceive.notify to Net::getConnectionReceiveEvent().notify


all the ones that are .receive as well that are in the same file
if it says notify then its getConnectionNotifyEvent() if it says receive it is getConnectionReceiveEvent()

Linking problem
Error 80 error LNK2019: unresolved external symbol "public: void __thiscall Component::setOwner(class Entity *)" (?setOwner@Component@@QAEXPAVEntity@@@Z) referenced in function "public: bool __thiscall Entity::addComponent(class Component *)" (?addComponent@Entity@@QAE_NPAVComponent@@@Z) .............................................\buildFiles\VisualStudio 2012\projects\entity.obj

In the DLL project you will see that under T3D folder that the components folder and code is missing
create components folder, add the existing files to it.
then add all the other missing folders in that same location under the components folder from that directory (animation, camera, collision, game, physics, and render)

Engine -> T3D -> components -> animation
Engine -> T3D -> components -> camera
Engine -> T3D -> components -> collision
Engine -> T3D -> components -> game
Engine -> T3D -> components -> physics
Engine -> T3D -> components -> render

the folders and code are already in the source code, they are just not in the DLL project itself. so you have to create those filters and add the existing code.
Then it compiles, links and runs just fine. (platform windows obviously : )

A quick check and any other settings (like select opengl, or other modules, etc all have the same problem, or more problems).

Maybe that will help someone, could just be project manager issues, but the PM is still handy for creating projects with solution files.