Support Forum G3D Web Page |
The steps for creating a new project on Windows using Visual Studio are simple:
G3D10\samples\starter
into it.starter.sln
to the name of your project. Do not rename main.vcproj
..sln
) file in Visual Studio.starter
to the name of your project.cmd
into the location box of an Explorer window, and run "builddoc" to generate API documentation for your project.x64
build
*.db
*.opendb
data-files\log.txt
data-files\g3d-license.txt
The project begins in Debug mode. To achieve higher performance, switch to Release mode using the build target dropdown box under the menu bar. Release mode programs can still be run under the debugger, but some of the symbols will not be visible because they have been optimized away.
You can compile without launching the program using the F7 key. Use ctrl+break to break execution for debugging and shift-F5 to kill a program that is running under the debugger.
Be sure to read about the built-in G3D developer tools.
G3D provides an easy-to-use build system for Linux and OS X called iCompile. This is a standalone Python script in the bin
directory of the G3D install. iCompile is an expert system that automatically detects your program's structure and builds it appropriately. This is what G3D itself is compiled with on these platforms.
To start a new G3D project, just create an empty directory. Inside of that directory, run icompile
with no arguments at the command line. It will prompt you to create a new project. Choose the "G3D Starter". iCompile will then compile this project for you. You can run it with icompile --opt --run
and should see the default G3D program.
The most frequently used commands are:
Command | Action -------------— |
---|---|
icompile | Compile the project |
icompile --run | Compile and run |
icompile --lldb | Compile and run under a debugger |
icompile --opt --run | Compile and run an optimized build |
icompile --help | Display all command information |
icompile --doc | Build documentation for your program using Doxygen |
Then, run icompile --doc
to generate documentation.
Finally, if you are using version control,
temp
build
data-files\log.txt
data-files\g3d-license.txt
You can use G3D with CMake, Xcode, Makefiles, etc. if you prefer. Copy the contents of G3D10/samples/starter
to a new directory and add all of the .cpp
files to your build system's project. You may delete the Visual Studio .sln
and .vcproj
files if you wish.
Link your program to the G3D static library and its static and dynamic dependencies. The clang++ linker options are below:
OS X Linker Options for clang++:
Linux linker options for clang++:
When launched, G3D programs expect the working directory to be the data-files
subdirectory of your project.
Be sure to read about the built-in G3D developer tools.