3DGlasses is a C library to develop applications that can be seen wearing 3D glasses.
This is not a full featured 3D library: it's your responsability to draw objects in correct z-order.
- Reading/writing configuration file works
- Geometry init works
- Simple shapes are showed correctly
Different kind of 3D glasses exists, this library supports the old ones with each lens of a different color; these glasses are called anaglyphs. Most common anaglyphs have a red lens for left eye, and a cyan lens for the right one, also exists glasses with green - magenta and very rare ones with yellow - blue lenses; 3DGlasses library supports all of them.
Nowadays 3D films at the cinema are watched with different kind of glasses that require special hardware but anaglyphs are still given with some DVDs (see ) or can be bought for few euros/dollars at eBay or some online store.
Origin of the axis is set at the center of the screen, with x incresing towards right, y increasing towards botton and z increasing towards "internal" of screen. For negative values of z the object appears outside the tv, inside the screen for positive values.
For z = 0, x goes from -320 to 320; perspective makes the range narrower for z < 0 and wider for z > 0. Y scale may change because the library tryes to keep 1:1 aspect ratio between axis.
The configuration file 3DGlasses.cfg, inside the main directory of your SD, is shared among all applications using this library. This file contains geometry info about your screen and the kind of anaglyphs you wear.
Probably this file is created the first time you run an application using 3DGlasses. If you change tv or glasses just delete this file (it will be recreated) or edit it by hand (instructions are inside the file itself).
Use of colors
Since the two eyes see different colors of the image you must avoid pure colors in your applications: if you draw a monochromatic red object it will be seen only by left eye with no 3D effect at all.
michelinux AT gmail DOT com