Steve_Yorkshire Posted November 15, 2015 Share Posted November 15, 2015 I've been porting AFX from 3.6.3 to 3.8 and hit some strange build errors. There's a few "uses undefined struct" and "cannot convert" errors relating to 5 of the AFX files but the errors reference console.h rather than lines in the AFX code. I'm a bit confused and at a loss what to do.Here's a pic (right click -> view) for full sizehttp://yorkshirerifles.com/random/afx_bugs1.jpgAnd here's the output1>------ Build started: Project: AFXtest DLL, Configuration: Release Win32 ------ 1> afxEA_AreaDamage.cpp 1> afxEA_CollisionEvent.cpp 1> afxEA_StaticShape.cpp 1> afxGuiSubstitutionField.cpp 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper' 1> with 1> [ 1> A=GameBaseData * 1> ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp) 1> ..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp(212) : see reference to function template instantiation 'ConsoleValueRef Con::executef(A,B,C,D,E,F,G)' being compiled 1> with 1> [ 1> A=GameBaseData * 1> , B=const char * 1> , C=const char * 1> , D=const char * 1> , E=char * 1> , F=const char * 1> , G=char * 1> ] 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2440: 'initializing' : cannot convert from 'GameBaseData *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp) 1> There is no context in which this conversion is possible 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp) 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(887): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper' 1> with 1> [ 1> A=ShapeBase * 1> ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp) 1> ..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp(227) : see reference to function template instantiation 'ConsoleValueRef Con::executef(A,B,C,D,E,F)' being compiled 1> with 1> [ 1> A=ShapeBase * 1> , B=const char * 1> , C=const char * 1> , D=char * 1> , E=char * 1> , F=const char * 1> ] 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(887): error C2440: 'initializing' : cannot convert from 'ShapeBase *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp) 1> There is no context in which this conversion is possible 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(887): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp) 1> afxStatusBox.cpp 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(885): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper' 1> with 1> [ 1> A=StaticShapeData * 1> ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp) 1> ..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp(158) : see reference to function template instantiation 'ConsoleValueRef Con::executef(A,B,C,D)' being compiled 1> with 1> [ 1> A=StaticShapeData * 1> , B=const char * 1> , C=const char * 1> , D=StringTableEntry 1> ] 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(885): error C2440: 'initializing' : cannot convert from 'StaticShapeData *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp) 1> There is no context in which this conversion is possible 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(885): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp) 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(886): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper' 1> with 1> [ 1> A=GuiInspector * 1> ] (..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp) 1> ..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp(202) : see reference to function template instantiation 'ConsoleValueRef Con::executef(A,B,C,D,E)' being compiled 1> with 1> [ 1> A=GuiInspector * 1> , B=const char * 1> , C=StringTableEntry 1> , D=StringTableEntry 1> , E=const char * 1> ] 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(886): error C2440: 'initializing' : cannot convert from 'GuiInspector *' to 'int' (..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp) 1> There is no context in which this conversion is possible 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(886): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp) 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper' 1> with 1> [ 1> A=GameBaseData * 1> ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp) 1> ..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp(179) : see reference to function template instantiation 'ConsoleValueRef Con::executef(A,B,C,D,E,F,G)' being compiled 1> with 1> [ 1> A=GameBaseData * 1> , B=StringTableEntry 1> , C=const char * 1> , D=const char * 1> , E=const char * 1> , F=char * 1> , G=StringTableEntry 1> ] 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2440: 'initializing' : cannot convert from 'GameBaseData *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp) 1> There is no context in which this conversion is possible 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp) 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(883): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper' 1> with 1> [ 1> A=afxStatusBox * 1> ] (..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp) 1> ..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp(44) : see reference to function template instantiation 'ConsoleValueRef Con::executef(A,B)' being compiled 1> with 1> [ 1> A=afxStatusBox * 1> , B=const char * 1> ] 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(883): error C2440: 'initializing' : cannot convert from 'afxStatusBox *' to 'int' (..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp) 1> There is no context in which this conversion is possible 1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(883): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp) 2>------ Build started: Project: AFXtest, Configuration: Release Win32 ------ 2>LINK : fatal error LNK1181: cannot open input file 'C:\Torque\Torque3D_38_Win\test_afx\My Projects\AFXtest\game\AFXtest DLL.lib' ========== Build: 0 succeeded, 2 failed, 15 up-to-date, 0 skipped ========== Any help appreciated. :? Quote Link to comment Share on other sites More sharing options...
Bloodknight Posted November 16, 2015 Share Posted November 16, 2015 https://github.com/Azaezel/Torque3D/blob/afx_full/Engine/source/afx/arcaneFX.h#L64-L66this help? Quote Link to comment Share on other sites More sharing options...
J0linar Posted November 16, 2015 Share Posted November 16, 2015 my guess would be that you have to add an extra include since there where api changes introduced in the latest versions of T3D,therefore include console/engineAPI.h/console.h in the files causing/having those errors,this might solve most warnings but probably not all, i had the same issue when i tried to port gmk/verve (where i have to admit that i gave that endeavour up).. Quote Link to comment Share on other sites More sharing options...
Steve_Yorkshire Posted November 16, 2015 Author Share Posted November 16, 2015 Adding engineAPI.h to arcaneFX.h threw up 122 "unresolved external symbols" relating to "onStaticModified".Adding engineAPI.h individually to the 5 error files stopped the original errors, until all 5 files had it, then it threw the above 122 errors again.Adding console/console.h had no effect on original errors.I mostly code gameplay and new classes so this bit of the engine is rather baffling.Also I notice Jeff had missed a few code comments so shockWaveData wasn't covered in his port, but it was easy to fix those errors. Quote Link to comment Share on other sites More sharing options...
J0linar Posted November 16, 2015 Share Posted November 16, 2015 Ye feel that, honestly am not able to port anything since those changes where introduced - that makes afx/verve/gm/guidebot and so on just uselessWould be nice if someone who has some actual knowledge would chime in to shed some light here Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 16, 2015 Share Posted November 16, 2015 https://github.com/faustlogic/Torque3D-plus-AFX/pull/1 make no promises other than it compiles. Also I notice Jeff had missed a few code comments so shockWaveData wasn't covered in his port, but it was easy to fix those errors. Does not function. Was removed in devhead. That's why that played up. Quote Link to comment Share on other sites More sharing options...
Gibby Posted November 16, 2015 Share Posted November 16, 2015 https://github.com/faustlogic/Torque3D-plus-AFX/pull/1 make no promises other than it compiles.Had your earlier 3.7 version working fine - this one does compile but crashes here: GFXD3D9Shader::_compileShader - Error compiling shader: E_FAIL: An undetermined error occurred (80004005) C:/Torque/Torque3D-afx_plus_3.8/My Projects/test38/game/shaders/common/lighting/advanced/vectorLightP.hlsl(70,27): error X3004: undeclared identifier 'prepassUncondition' Failed to initialize material 'AL_VectorLightMaterial' c:\torque\torque3d-afx_plus_3.8\engine\source\materials\matinstance.cpp(525,0): {Fatal} - Not init'ed! any ideas? Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 16, 2015 Share Posted November 16, 2015 https://github.com/Azaezel/Torque3D/blob/afx_plus_3.8/Templates/Full_AFX/game/shaders/common/lighting/advanced/vectorLightP.hlsl#L70Not offhand, but then, I've stuck to the regular full directory most times and thrown AFX bits in per-project... could be a script ref change... will poke as time allows... Which directory did you try as your baseline? Quote Link to comment Share on other sites More sharing options...
Gibby Posted November 16, 2015 Share Posted November 16, 2015 Ahhh, found it, the 'Full_AFX' template hadn't been updated with newest shader stuff - diffing it with 'Full' made it work...I'll bash away on it some more this eve, see if I can break anything else ;P Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 16, 2015 Share Posted November 16, 2015 Appreciate it. Been all over the place lately. Among other things. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 17, 2015 Share Posted November 17, 2015 PR updated with script alts. *thiiiink* I caught em all, if someone would be so kind as to run a spot-check. Quote Link to comment Share on other sites More sharing options...
RasterRon Posted November 18, 2015 Share Posted November 18, 2015 Hey Azaezel,I'm quite interested and would like to help in trying this one out. Just to confirm, is this the link to the branch?https://github.com/Azaezel/Torque3D/tree/afx_plus_3.8Thanks. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 18, 2015 Share Posted November 18, 2015 yep Quote Link to comment Share on other sites More sharing options...
Dwarf King Posted November 19, 2015 Share Posted November 19, 2015 Ahhh, found it, the 'Full_AFX' template hadn't been updated with newest shader stuff - diffing it with 'Full' made it work...I'll bash away on it some more this eve, see if I can break anything else ;P Good to see you around :D I kind of thought you had left us as you never answered any of my mails or forums posts :o Quote Link to comment Share on other sites More sharing options...
Gibby Posted November 20, 2015 Share Posted November 20, 2015 Ahhh, found it, the 'Full_AFX' template hadn't been updated with newest shader stuff - diffing it with 'Full' made it work...I'll bash away on it some more this eve, see if I can break anything else ;P Good to see you around :D I kind of thought you had left us as you never answered any of my mails or forums posts :o Update: I've tinkered with stock AFX and then added my own set of mods, which include many of AZ's, Acasters, Visad's and my own, and have so far not seen any other issues than I'm seeing with stock 3.8. just random crashes in the editors while in OpenGL. Anyone else out there using Az's port?@DK: got a job :mrgreen: Quote Link to comment Share on other sites More sharing options...
J0linar Posted November 22, 2015 Share Posted November 22, 2015 just tested https://github.com/Azaezel/Torque3D/tree/afx_plus_3.8works good so far Quote Link to comment Share on other sites More sharing options...
Steve_Yorkshire Posted November 26, 2015 Author Share Posted November 26, 2015 Not found any issues playing around with Az's afx3.8 branch ... which is nice. :) Quote Link to comment Share on other sites More sharing options...
Dwarf King Posted January 13, 2016 Share Posted January 13, 2016 .... tried the branch with DX11 as well... https://github.com/Azaezel/Torque3D/tree/afx3.8_DX11got a bunch of shader errors... ... kind of lacking the man power to fix those issues here and now... I am now trying this branch here:https://github.com/Azaezel/Torque3D/tree/afx_plus_3.8Gotta start port the project to a more modern version as I am still running on version 3.51... :roll: Quote Link to comment Share on other sites More sharing options...
Azaezel Posted January 13, 2016 Share Posted January 13, 2016 Mind throwing out a list?Edit: Pretty much just dropped the AFX shaders dir from the personal game right on in... Quote Link to comment Share on other sites More sharing options...
Dwarf King Posted January 13, 2016 Share Posted January 13, 2016 (edited) Mind throwing out a list?Edit: Pretty much just dropped the AFX shaders dir from the personal game right on in... Oh I see :D Well the error I got before Windows 10 decided to crash my machine during the use of Firefox... :roll: ... was: torque3d-afx3.8_dx11\engine\source\gfx\d3d9\gfxd3d9shader.cpp(824,0): {Fatal-ISV} - GFXD3D9Shader::initShader - failed to open shader 'shaders/common/fixedFunction/textureV.hlsl'. GFXD3D9Shader::_compileShader - Failed to open shader file 'shaders/common/fixedFunction/textureV.hlsl'. First-chance exception at 0x10866F6C (T3D_DX11_AFX_V38_DEBUG DLL.dll) in T3D_DX11_AFX_V38_DEBUG.exe: 0xC0000005: Access violation reading location 0x00000000. Unhandled exception at 0x10866F6C (T3D_DX11_AFX_V38_DEBUG DLL.dll) in T3D_DX11_AFX_V38_DEBUG.exe: 0xC0000005: Access violation reading location 0x00000000. But as I can understand I will need to drop the AFX shaders dir from any current AFX project into my new build/folder structure. Right?I will try that now.Edit:I read Skibby's comment as well. I took the shader files from the full template and the DX 11 version loads well now... Damn this looks promising! :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: Edited January 13, 2016 by Dwarf King Quote Link to comment Share on other sites More sharing options...
Azaezel Posted January 13, 2016 Share Posted January 13, 2016 That one sounds familiar. Should have been resolved in the Templates\Full_AFX subproject. if not, will take a look soons I can (likely tomorrow). Quote Link to comment Share on other sites More sharing options...
Dwarf King Posted January 13, 2016 Share Posted January 13, 2016 :mrgreen: I took all the shader files from the full template and dropped them in my own compile demo project under commen etc. It seems to work now. So the shader files are not added when creating the project. Not a big issue for Torquers :mrgreen:Edit:Seems that the dynamic shadows when the Torque orc is moving is lagging/ha ha hacking in both DX9 and DX11. Otherwise the effects seems very well(AFX). I will have to port project and do some more testings. Quote Link to comment Share on other sites More sharing options...
Timmy Posted January 14, 2016 Share Posted January 14, 2016 Seems that the dynamic shadows when the Torque orc is moving is lagging/ha ha hacking in both DX9 and DX11. . Try changing the values of the shadow caching. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted January 14, 2016 Share Posted January 14, 2016 :mrgreen: I took all the shader files from the full template and dropped them in my own compile demo project under commen etc. It seems to work now. So the shader files are not added when creating the project. Not a big issue for Torquers :mrgreen:Edit:Seems that the dynamic shadows when the Torque orc is moving is lagging/ha ha hacking in both DX9 and DX11. Otherwise the effects seems very well(AFX). I will have to port project and do some more testings. That'll be the new shadowcaching system. would go to the materials and flip on castsdynamicshadows. Quote Link to comment Share on other sites More sharing options...
Dwarf King Posted January 14, 2016 Share Posted January 14, 2016 (edited) :mrgreen: I took all the shader files from the full template and dropped them in my own compile demo project under commen etc. It seems to work now. So the shader files are not added when creating the project. Not a big issue for Torquers :mrgreen:Edit:Seems that the dynamic shadows when the Torque orc is moving is lagging/ha ha hacking in both DX9 and DX11. Otherwise the effects seems very well(AFX). I will have to port project and do some more testings. That'll be the new shadowcaching system. would go to the materials and flip on castsdynamicshadows. Okay thanks :D I will look into that then.When starting up Torsion I get this error. I can still use Torsion but does any of you have any idea what the problem is?http://www.noblegamesproduction.com/wp-content/uploads/2016/01/Torsion-Error-Upon-start02.pngIt is popping up a second and closes itself before anyone can react. I caught it with a print screen. Perhaps the issues is only temporary?Oh and I am going through the FrameAllocator.cpp and FrameAllocator.h to see what is going on as well right now.Edit:Problem fixed. The problem was that the release in Torsion pointed down to the debug.exe and not the release exe. Dooooh! :oops: @Timmy && @Azaezel you have done some really outstanding work here. Damn this is awesome super über grand work :mrgreen: Hail @Timmy, @Azaezel and all other who have helped with this!!!Edit edit: and now back to some porting, porting porting and yet some porting :ugeek: Edited January 14, 2016 by Dwarf King Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.