Graphics Reference
In-Depth Information
needed. In addition, the App.h and App.cpp files can also be copied to the new directory as
a starting point for the application.
After you create the project in this manner, it is nearly ready to be compiled and
ran. First, the project must be added to the Hieroglyph 3 solution. To do this, right-click
on the solution from within the IDE, select Add -> Existing Project..., and then select
the new project file. The final step is to set the solution properties to make the new proj-
ect depend on the Hieroglyph 3 project, which is done by right clicking the solution and
choosing Properties. From the resulting dialog, choose Common Properties > Project
Dependencies and select the new project from the drop-down list. Then check the
Hieroglyph 3 project as a dependency, and the new project will correctly be built only after
the Hieroglyph 3 project is.
In addition to the project folders, there is a Data folder that houses the file based data
for the samples, including shader programs, textures, Lua script files, and geometric mod-
els. The paths in the project files are set up to be relative, so the files in this data directory
are available to all of the projects. Any new data files should be added to these directories
in the appropriate place. Because of this data folder layout, you must provide the files in a
similar manner when running them outside of the Visual C++ IDE. If you want to directly
run the *. EXE, you should copy it to the Application/Bin directory, which will pro-
vide the same reference paths.
Compilation and Deployment
Compiling a Hieroglyph 3 application can be done easily through Visual Studio. Simply
open the Hieroglyph 3 solution, then select Build > Build Solution from the window menu.
This will cause the Hieroglyph 3 project and all application projects to be compiled and
linked. For debugging, projects should be built with the Debug solution configuration,
which disables optimizations and produces full debugging symbols. This configuration can
be selected from the left-most drop-down box in the toolbar beneath the window menu. To
enable full optimizations, select the Release configuration instead. To debug an applica-
tion, right-click on the project for the desired application and select Set as Startup Project.
Then select Debug >Start Debugging from the window menu to start the application in the
debugger.
If a Hieroglyph 3 application will be deployed to a non-development computer, it is
important to distribute not only the compiled Release-mode executable and shader/texture/
model content, but also to ensure that DLL dependencies are installed on the host PC. By
default, a Hieroglyph 3 application will have two such dependencies: the DirectX End-
User Runtime, and the Visual C++ 2008 Runtime.
There are two options for distributing the DirectX runtimes: the Web installer, and
the offline installer. The Web installer is available from the DirectX Developer Center, and
Search WWH ::




Custom Search