Sign in to follow this  

How can I get started with the Hieroglyph3 framework?

This topic is 1102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, everyone!

I'm reading a famous book <Practical Rendering and Computation with Direct3D 11>. It is said to be a wonderful book, so I decided to learn it. I have read Frank D. Luna's <Introduction to 3D Game Programming with DirectX 9.0c)>, and some portions of its DX 11 edition, too, so I think there won't be too many problems learning this book. But ... 

But I just don't know how to get started! I found the source code of the Hieroglyph 3 framework from the "SOURCE CODE" tab of the Hieroglyph3 website (after some examination, you know, since there's nothing in the "DOWNLOADS" tab), but I can't just get it running! Well, according to the ReadMe.txt file that can be found in the Hieroglyph3 file folder, I have to get Windows 8 SDK, Lua and DirectXTK to get it up and running, but what are the exact steps? Am I supposed to download these stuff and put them into the Dependencies subfolder? Or do I need to configure the project in VS 2012? But I found myself at sea after opening the Hieroglyph3_Desktop file with VS 2012 ---- there are so many things inside and I just don't know what to do! And the contents in the solution properties menu are quite different from what I saw in the past days! 

The book itself doesn't say much about how to get the framework running in the Appendix. So I consult the "DOCUMENTATION" tab of the Hieroglyph3 website, only to find that it only said little about the specific steps except the conversion from a vs 2008 project file into a vs 2010 one. So can I say this is a bit out-dated? 

So, can anybody tell me what can I do to run even the simplest sample of the book? Thank you so much! I'm really feeling helpless. Or maybe I'd better download the older edition that accompanied this book? Unfortunately, I am not able to find that...

Share this post


Link to post
Share on other sites

About the source code: download the source code, extract it where you prefer, open the solution file (.sln) and press F7 to compile. You need a VS2012 edition or greater (express desktop would compile all except the mfc sample) and the Window SDK 8.0 or greater installed.... 

 

About the book: I found the first part a really great reference book, while the second part covers some "new" DX11 FL11_0 scenarios and it could be not appropriate for a beginner.

If you want a tutorial-books you should look at the last Luna's book or (if you want a shader approach and a bit modern code) "Real-Time 3D Rendering with DirectX and HLSL" (Paul Varcholik).

Edited by Alessio1989

Share this post


Link to post
Share on other sites

About the source code: download the source code, extract it where you prefer, open the solution file (.sln) and press F7 to compile. You need a VS2012 edition or greater (express desktop would compile all except the mfc sample) and the Window SDK 8.0 or greater installed.... 

 

About the book: I found the first part a really great reference book, while the second part covers some "new" DX11 FL11_0 scenarios and it could be not appropriate for a beginner.

If you want a tutorial-books you should look at the last Luna's book or (if you want a shader approach and a bit modern code) "Real-Time 3D Rendering with DirectX and HLSL" (Paul Varcholik).

 

 

Thanks a lot! Seems you have tried this new version and played with it for some time. That's great!

 

But I still get a few questions to ask. Where can I obtain Windows SDK 8.0 (Lua, DirectXTK)? What location should I install them into? This book, I know, would be a little difficult for me; but never the "get it up and running" part. How I wish there is a detailed intruction (even better with pictures!) on how to use this framework!

Share this post


Link to post
Share on other sites

Windows SDK 8.0 is installed with visual studio, just install Visual Studio 2013 for Windows Desktop Community Edition(or Express)

DXTK - http://directxtk.codeplex.com/
Lua - http://www.lua.org/download.html search the install dir for include and lib directories

 

hope that will help

But what do I need to do after the installation? That's the major problem. Can you help me? Thanks a lot. ^_^

Share this post


Link to post
Share on other sites

LUA runtime come with the Hieroglyph3 sources.

DirectXTK will be downloaded automatically from visual studio through NuGet.

 

All you need is VS2012 express desktop/professional or newer version, extract the last H3 sources, open Hieroglyph3_Desktop.sln (located in the "trunk" directory) and build it.

 

edit: it appears that some linkages from DXTK are broken with VS2013, you need to link DirectXTK.lib manually in the project files..

Edited by Alessio1989

Share this post


Link to post
Share on other sites

LUA runtime come with the Hieroglyph3 sources.

DirectXTK will be downloaded automatically from visual studio through NuGet.

 

All you need is VS2012 express desktop/professional or newer version, extract the last H3 sources, open Hieroglyph3_Desktop.sln (located in the "trunk" directory) and build it.

 

edit: it appears that some linkages from DXTK are broken with VS2013, you need to link DirectXTK.lib manually in the project files..

 

 

Well, I opened Hieroglyph3_Desktop.sln with VS 2012 Ultimate Edition, and after building it, it said:

 

error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\directxtk.2.22.13.23\build\native\directxtk.targets.

 

So what exactlly is NuGet? And what can I do to get around this problem? Thank you very much!

Share this post


Link to post
Share on other sites

nuget is a packet manager developed for VS, it will comes with Windows 10 too..

 

you should manaually link the compiled dxtk library to the project and disable the DXTK nuget package.

 

That's the problem. I don't know how to link anything to this very, very big project...

And if I'm not supposed to use NuGet, where can I find the DXTK?ohmy.png

Share this post


Link to post
Share on other sites

 

error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\directxtk.2.22.13.23\build\native\directxtk.targets.

 

Right click on the Solution (in the Solution Explorer inside Visual Studio) and select Enable NuGet Package Restore. Then try building the solution again. NuGet should then automatically download any missing package, if able.

Share this post


Link to post
Share on other sites

Thank you for your interest in the book and framework - sorry it took a while for me to see this thread...  If you are using VS2012, all of the pre-requisites should already be installed and ready to run.  The NuGet package for DirectXTK should automatically download, or if you disabled automatic downloads you should be prompted about downloading it.

 

Regarding the older versions of the framework, there is information in the documentation about what commit level was released with the book.  However, the book samples focus on the GPU side of the samples, so you can safely use the latest version and follow along just fine.  This was done intentionally, so that the CPU side could evolve over time while still keeping the samples relevant.

 

When you have questions like this, it could be faster to post them in the Hieroglyph discussions forum.  There have been a few other questions like this as well, so you might be able to find an answer right away too.  (plus I get email notifications of new discussions, so I will see your post right away...)

 

EDIT: you don't have to modify any of the settings for linking or includes - all of those should already be set up relative to the project folder.  Just open the Hieroglyph3_Desktop.sln file, rebuild all, and it should take off on its own.  Also be sure to set the desired project as the startup project (which you can do by right clicking it and choosing "Set As Startup Project").

Edited by Jason Z

Share this post


Link to post
Share on other sites

@Jason Z: I tried the last build (89332) but it does not compile with VS2013 U4. The DXTK nuget package is download ad appear to be fine, but I got LNK2019, like these on the applications' projects:

3>Hieroglyph3_Desktop.lib(RendererDX11.obj) : error LNK2019: unresolved external symbol "long __cdecl DirectX::CreateWICTextureFromMemory(struct ID3D11Device *,struct ID3D11DeviceContext *,unsigned char const *,unsigned int,struct ID3D11Resource * *,struct ID3D11ShaderResourceView * *,unsigned int)" (?CreateWICTextureFromMemory@DirectX@@YAJPAUID3D11Device@@PAUID3D11DeviceContext@@PBEIPAPAUID3D11Resource@@PAPAUID3D11ShaderResourceView@@I@Z) referenced in function "public: class std::shared_ptr<class Glyph3::ResourceProxyDX11> __thiscall Glyph3::RendererDX11::LoadTexture(void *,unsigned long)" (?LoadTexture@RendererDX11@Glyph3@@QAE?AV?$shared_ptr@VResourceProxyDX11@Glyph3@@@std@@PAXK@Z)

3>Hieroglyph3_Desktop.lib(RendererDX11.obj) : error LNK2019: unresolved external symbol "long __cdecl DirectX::CreateWICTextureFromFileEx(struct ID3D11Device *,struct ID3D11DeviceContext *,wchar_t const *,unsigned int,enum D3D11_USAGE,unsigned int,unsigned int,unsigned int,bool,struct ID3D11Resource * *,struct ID3D11ShaderResourceView * *)" (?CreateWICTextureFromFileEx@DirectX@@YAJPAUID3D11Device@@PAUID3D11DeviceContext@@PB_WIW4D3D11_USAGE@@III_NPAPAUID3D11Resource@@PAPAUID3D11ShaderResourceView@@@Z) referenced in function "public: class std::shared_ptr<class Glyph3::ResourceProxyDX11> __thiscall Glyph3::RendererDX11::LoadTexture(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,bool)" (?LoadTexture@RendererDX11@Glyph3@@QAE?AV?$shared_ptr@VResourceProxyDX11@Glyph3@@@std@@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@4@_N@Z)

Edited by Alessio1989

Share this post


Link to post
Share on other sites


Right click on the Solution (in the Solution Explorer inside Visual Studio) and select Enable NuGet Package Restore. Then try building the solution again. NuGet should then automatically download any missing package, if able.

 

Yeah, thank you so much! I followed what you said, and after a while, I can see there is a nuget folder in the solution explorer. The problem is ... after built, it still reports errors. It says 1 succeeded, 22 failed. Since the error message is so long, I'll just copy the last few lines here:

23>f:\practical rendering and computation with d3d 11\hieroglyph3\applications\particlestorm\particlesystemactor.cpp(12): fatal error C1083: Cannot open include file: 'PCH.h': No such file or directory
23>  Generating Code...
15>  App.cpp
15>f:\practical rendering and computation with d3d 11\hieroglyph3\applications\lightprepass\app.h(10): fatal error C1083: Cannot open include file: 'RenderApplication.h': No such file or directory
15>  Generating Code...

and if I click the "Local Windows Debugger" button in the toolbox, it will generate a message:

1>F:\Practical Rendering and Computation with D3D 11\Hieroglyph3\Source\Hieroglyph3_Desktop.vcxproj(754,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\directxtk.2.22.13.23\build\native\directxtk.targets.

So what's the problem? What can I do to fix it?

Share this post


Link to post
Share on other sites

That usually means that the Lua project built fine (since it has zero dependencies) and that the Hieroglyph3 library failed, causing all the applications to fail too.  The issue is likely due to the fact that you are using VS2013, and the nuget package is installed for 2012.  If you uninstall the NuGet package for VS2012 from the package manager, and then install the VS2013 version, it should probably work out for you.

 

I am in the process of updating to VS2013, so it shouldn't be too long before I do this update and push it to the repo.

Share this post


Link to post
Share on other sites

That usually means that the Lua project built fine (since it has zero dependencies) and that the Hieroglyph3 library failed, causing all the applications to fail too.  The issue is likely due to the fact that you are using VS2013, and the nuget package is installed for 2012.  If you uninstall the NuGet package for VS2012 from the package manager, and then install the VS2013 version, it should probably work out for you.

 

I am in the process of updating to VS2013, so it shouldn't be too long before I do this update and push it to the repo.

 

No, I opened it with VS 2012 ultimate edition. And if I open it with VS 2013, after being built, it will report 41 errors...

 

So I am really looking forward to your updating to the vs 2013 edition; after all, that's the main developing environment for me.

 

By the way, when I open the VS 2012, it reminds me of some updates. Could that be the reason?

Share this post


Link to post
Share on other sites

Can you try rebuilding only the Hieroglyph 3 project and copy the errors that are reported to here?  All the applications are failing to compile since the Hieroglyph 3 library isn't compiling correctly.

Share this post


Link to post
Share on other sites

Can you try rebuilding only the Hieroglyph 3 project and copy the errors that are reported to here?  All the applications are failing to compile since the Hieroglyph 3 library isn't compiling correctly.

OK, I selected Hieroglyph3_Desktop project in the solution explorer, right-clicked it and selected "Rebuild", and the error message is as follows:

1>------ Rebuild All started: Project: LuaLib, Configuration: Debug Win32 ------
1>  lzio.c
1>  lvm.c
1>  lundump.c
1>  ltm.c
1>  ltablib.c
1>  ltable.c
1>  lstrlib.c
1>  lstring.c
1>  lstate.c
1>  lparser.c
1>  loslib.c
1>  lopcodes.c
1>  lobject.c
1>  loadlib.c
1>  lmem.c
1>  lmathlib.c
1>  llex.c
1>  liolib.c
1>  linit.c
1>  lgc.c
1>  Generating Code...
1>  Compiling...
1>  lfunc.c
1>  ldump.c
1>  ldo.c
1>  ldebug.c
1>  ldblib.c
1>  lcode.c
1>  lbaselib.c
1>  lauxlib.c
1>  lapi.c
1>  Generating Code...
1>  LuaLib.vcxproj -> F:\Practical Rendering and Computation with D3D 11\Hieroglyph3\Dependencies\lua-5.1.4\LuaLib\Bin\Win32\Debug\LuaLib.lib
2>------ Rebuild All started: Project: Hieroglyph3_Desktop, Configuration: Debug Win32 ------
2>F:\Practical Rendering and Computation with D3D 11\Hieroglyph3\Source\Hieroglyph3_Desktop.vcxproj(754,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\directxtk.2.22.13.23\build\native\directxtk.targets.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Share this post


Link to post
Share on other sites

That is strange - if you have enabled the NuGet package restoring, and it is downloading for you, then I don't know why it wouldn't be working.  Perhaps if you opened it with VS2013 first, then it may have changed the NuGet package references during the project upgrade.  Can you please download a fresh copy of the source and make sure you open it only with VS2012, enable the NuGet package restore, and then rebuild all?

Share this post


Link to post
Share on other sites

That is strange - if you have enabled the NuGet package restoring, and it is downloading for you, then I don't know why it wouldn't be working.  Perhaps if you opened it with VS2013 first, then it may have changed the NuGet package references during the project upgrade.  Can you please download a fresh copy of the source and make sure you open it only with VS2012, enable the NuGet package restore, and then rebuild all?

 

Yeah, I did what you said. But everything remains the same. I found that in the Hieroglyph3 folder, there will be a subfolder named .nuget after the restoring, and it contains three files:

an XML Configuration File, an executable named NuGet, and NuGet.targets.

 

Is that all right? If not, what shall I do?

Share this post


Link to post
Share on other sites

That isn't what I have.  I have a 'packages' folder in Hieroglyph3, and inside of that is a separate folder with the directxtk package and folder.  For some reason your NuGet isn't functioning properly (or at least how I would expect it to work).

Share this post


Link to post
Share on other sites

That is strange - if you have enabled the NuGet package restoring, and it is downloading for you, then I don't know why it wouldn't be working.  Perhaps if you opened it with VS2013 first, then it may have changed the NuGet package references during the project upgrade.  Can you please download a fresh copy of the source and make sure you open it only with VS2012, enable the NuGet package restore, and then rebuild all?

 

I found something interesting ...

Having seen nothing more could be done with VS 2012, I tried to open Hieroglyph3_Desktop with VS 2013. I followed the same ideas, but this time things were different... The restoration takes a little more time, and during the build, it seems to be downloading something, which makes the build extremely slow. Still, the build ended up with a few errors. But I think some of the messages in the error list during the build might be helpful:

2>------ Rebuild All started: Project: Hieroglyph3_Desktop, Configuration: Debug Win32 ------
2>  restoring NuGet package...
2>  If you want to prevent NuGet from downloading packages during build, pleas open the "Visual Studio options" dialog box, click the "package manager" node and deselect "Allow NuGet to download missing packages".
2>  Installing 'directxtk 2.22.13.23'.
2>  Successfully installed 'directxtk 2.22.13.23'.

Then I opened the solution with VS 2012 again, and during the build, it took some more time, too. Unfortunately, it ended up with some errors, too. Since this time there are too many lines in the error list, I choose not to paste any here.

 

Then, I thought that may have something to do with the Tools->Options->Package Manager configuration, so I deleted the messed-up Hieroglyph3 folder, copy the original one, and opened it with vs 2012 once again. This time, I paid attention to that configuration, but everything seemed normal...

 

Well, you may have guessed... After the restoring and build, everything remain the same.

 

So, basically, I think I have found why it didn't work------VS 2012 somehow "forgot" to download the necessary packages during build. The question is: how to fix this problem?

 

Or perhaps the answer lies in the difference between the professional edition and the ultimate edition? My vs 2013 is professional, while vs 2012 is ultimate...

Edited by SuperSaiyan3

Share this post


Link to post
Share on other sites

This topic is 1102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this