Get it and find out about these fine new features:
- texture loading,
- ".mtl" parsing with Boost's Spirit parser framework.
TooL uses the power of Boost to generate its ".mtl" parser.
TooL now reads associated ".mtl" files.
Ambient, diffuse, specular, shininess, and diffuse texture mapping are supported (cf. screenshots).
Most recognized image formats are accepted as textures (BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG, TGA, and TIFF), indexed or TrueColor, transparent or opaque.
Notes:
TooL is ready to import images as textures, thanks to Boost and SDL_image !
Changes:
* TooL uses Boost for shared pointers (to share heavymesh and image resources)
* The window management related classes design is cleaner.
* TooL uses SDL_image to deal with image formats.
See :
http://www.boost.org/
http://www.libsdl.org/projects/SDL_image/
The great C++ library Boost provides a lot of usefull classes. TooL now uses it for shared pointers, and probably more shortly.
An additional "Test" target was added to the project, enabling unit testing.
Just ignore the "Test" directory if you don't want to use it.
See also: http://sourceforge.net/projects/cppunit.
TooL now behaves as any other Mac OS X application.
- Droping a .obj file on the app's icon now opens the file with TooL.
- You can specify the obj file in the command line too:
> open ToolSDL.app [file.obj]
Tool v0.2.0 is out !
- Tool now uses SDL for its display window.
- The user can now independantly move the mesh, the camera, and the world.
- If the loaded mesh has no normals, Tool generates some flat normals.
- Material loading is postponed.
Next iteration (probably coming in 2006!) will include:
- some 2D graphics (HUD and background).
- Texture & material loading.
Tool doesn't use GLUT anymore to manage its display window & user events, SDL does the dirty work (http://www.libsdl.org/).
The change was rather quick, only three classes where privately affected: CWindowManager, CMouseController, and CKeyboardController.
No public interface was broken, so no other class was changed.
The change was necessary because I needed more control on the main loop, which GLUT doesn't provide.
E.g. quitting GLUT's main loop requires an exit(0), and it needed global functions for callbacks.
SDL is more complex but much cleaner (provided it's used right of course) and provides image format handling facilities, which will be necessary for textures.... read more
In the pipe:
- get rid of GLUT in favor of SDL,
- generate normals,
- load mtl files.
Here's the Readme:
The OpenGL Obj Loader - v0.1
1. Release
This is the first iteration, no speed or memory optimisation has been done.
The largest model I tried (350,000 triangles) loaded alright on a 700 Mhz Mac (slightly choppy framerate though).
2. Build
Non-Mac users should change references to "GLUT/glut.h" in "GL/glut.h".
Uses OpenGL and GLUT libraries (cf. http://www.opengl.org/\).... read more
The first iteration is running, expect a file release later tonight !
It loads and displays 'OBJ' mesh with or without texture coords & normal data.
The viewer uses glut and the view is static but expect some animation in later iterations...