University of North Carolina at Charlotte



ITCS 6127 SDKs

Zachary Wartell

Revision 1.0

Assumptions

1. Microsoft (MS) Windows students are using MSVS 2005.

SDKs

We will use the following APIs: OpenGL, GLEE, SDL, Collada DOM. Additionally there are several tools and example applications associated with these libraries that will be useful.

For the course’s SDKs’ libraries, I give additional instructions when need to make sure the SDKs work together and compile with the example code given on the course website[i].

1. OpenGL – cross-platform graphics

On MS Windows:

a. OpenGL (GL) is provided with MSVS 2005, but to use features beyond GL version 1.4 you need GLEE.

2. GLEE – cross-platform library for programming with modern OpenGL versions (beyond 1.4) OpenGL extensions. glee.php

On MS Windows:

a. Grab the GLEE package from the class website.[ii]

b. Open and compile library from glee.sln

c. Create a user environment variable GLEE_DIR and set it to the path where you put the GLEE directory. For me this was:

E:\Users\Zachary\Documents\Career\research\libraries\glee

3. SDL – “cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.” at .[iii]

On MS Windows:

a. Download and install the Direct X SDK.[iv]

(Note, installation automatically create a user environment variable DXSDK_DIR and sets it to the path where the DirectX SDK is installed).

b. Download SDL source code and place in a directory named:

SDL

c. Follow instructions in SDL\VisualC.html but see my following alterations and comments:

i. After unzipping SDL\VisualC.zip your files should be organized like:

SDL\VisualC.html

SDL\VisualC\SDL.sln,

…etc.[v]

Compiling SDL:

ii. Open SDL\VisualC\SDL.sln

iii. On “SDL Property Page” dialog, add to the 'Configuration Properties:C/C++:General:Additional Include Directories' the path to the DirectX SDK .h files. For example:

$(DXSDK_DIR)\include

iv. On “SDL Property Page”, add to the 'Configuration Properties:Linker:General:Additional Library Directories' the path to the Direct X SDK .lib files. For example:

$(DXSDK)\Lib\x86

v. On “SDL Property Page” dialog, open the “Configuration Manager”. change “Configuration Properties:C/C++:Code Generation:Runtime Library” to “Multi-threaded Debug DLL (/MDd)”. [vi]

vi. On “SDLmain Property Page” dialog, change “Configuration Properties:C/C++:Code Generation:Runtime Library” to “Multi-threaded Debug DLL (/MDd)”

vii. Now compile both SDL projects.

“Install” and Test SDL

viii. Create a user environment variable, SDL_DIR, and set it to the full path your SDL directory.

ix. To test things, open SDL\VisualC\tests\tests.sln and compile and run the Project testgl. But first modify the testgl project as follows:

1. change the Runtime Library to “Multi-threaded Debug DLL (/MDd)” first.

2. set 'Configuration Properties:Debugging:Environment' to:

PATH=%SDL_DIR%\VisualC\SDL\Debug;%PATH%

4. COLLADA DOM– Collada is XML based file format designed for interchanging 3D digital content between different digital content creation tools. Collada file name extension is .dae. Collada is a growing industry standard so it should be able to find .dae files on-line or export to .dae from your favorite 3D modeling. We will use the Collada DOM library for reading in 3D models and a number of Collada based tools for processing .dae files.

The Collada DOM user guide describes how to download the libraries and compile you application using them. The DOM user programming guide is at:

mediawiki/index.php/COLLADA_DOM_user_guide

The DOM library loads .dae files and creates in memory C++ objects from a C++ class hierarchy. The class hierarchy closely corresponds to Collada’s XML schema. The DOM library includes documentation on the C++ classes but it may be useful to glance at the Collada XML specifications since they source of the C++ classes. The Collada XML specs are found here:

The Web is full of Collada model’s here are some links:





On MS Windows:

The user guide describes how to get and compile the DOM library. Additionally under Windows, you should create a user environment variable called COLLADA_DOM_LOCATION that points to the path to the directory where you installed the DOM library.

Tools

1. Collada Refinery - The Collada Refinery is a GUI based application for performing various file transformations on .dae files. For our purposes the primary useful file transformations (called ‘conditioners’) are the following ‘geometry processing’ ones

a. polylists2triangles – this triangulates all polygons into triangles

b. deindexer – reorganizes multi-indices into single-indices suitable for OpenGL

Use the Refinery to process any 3D models you want to work with into versions that are triangulated and deindexed This will greatly simplify write code to load and render the .dae files.

Links for the Refinery are:

• - documentation

• - download. Just download the installer. No need to get source and compile, etc.

Footnotes

-----------------------

[i] For all MS Windows compilation of course examples and open source libraries, I assume: (1) Executables and libraries are compiled consistently using the Multi-threaded Debug DLL version of the C run-time library; (2) Paths to any compiled open source DLLs are found at run-time by MSVS 2005 by having set the PATH environment variable in the Project settings ‘Configuration Properties:Debugging: Environment’ so that PATH includes all necessary directories to the compiled open source libraries; (3) For each SDK, an environment variable is created pointing to the SDK’s installation directory.

[ii] Circa 1/29/08 the official GLEE distribution contains no .sln file and while it contains a precompiled windows binary, the binary gave me linking problems under MSVS 2005. Hence, I recommend compiling it yourself.

[iii] I used SDL version 1.2.13

[iv] This could take some time. E.g. DirectX 10 SDK was 500MB!

[v] Instructions in VisualC.html seem confusing. They seem to imply you should end up with file organization like SDL\VisualC.html, SDL\SDL.sln, SDL\SDL.dsw, etc. which doesn’t compile.

[vi] By default SDL’s Debug Configuration uses the non-debug Runtime Library (Multi-threaded DLL /MD). Most other libraries, however, use the Debug version of the Runtime Library for the Debug compilation of the library. Trouble will occur when you try to link two Debug libraries (such as SDL and GLEE) that used different Run-time libraries. To avoid this problem, we switch SDL Debug configuration to use the debug Runtime library.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download