source: trunk/sys/TinyGL/README @ 25

Last change on this file since 25 was 1, checked in by alain, 8 years ago

First import

File size: 5.1 KB
Line 
1TinyGL 0.4 (c) 1997-2002 Fabrice Bellard.
2
3General Description:
4--------------------
5
6TinyGL is intended to be a very small implementation of a subset of
7OpenGL* for embedded systems or games. It is a software only
8implementation. Only the main OpenGL calls are implemented. All the
9calls I considered not important are simply *not implemented*.
10
11The main strength of TinyGL is that it is fast and simple because it
12has not to be exactly compatible with OpenGL. In particular, the
13texture mapping and the geometrical transformations are very fast.
14
15The main features of TinyGL are:
16
17- Header compatible with OpenGL (the headers are adapted from the very good
18Mesa by Brian Paul et al.)
19
20- Zlib-like licence for easy integration in commercial designs (read
21the LICENCE file).
22
23- Subset of GLX for easy testing with X Window.
24
25- GLX like API (NGLX) to use it with NanoX in MicroWindows/NanoX.
26
27- Subset of BGLView under BeOS.
28
29- OpenGL like lightening.
30
31- Complete OpenGL selection mode handling for object picking.
32
33- 16 bit Z buffer. 16/24/32 bit RGB rendering. High speed dithering to
34paletted 8 bits if needed. High speed conversion to 24 bit packed
35pixel or 32 bit RGBA if needed.
36
37- Fast Gouraud shadding optimized for 16 bit RGB.
38
39- Fast texture mapping capabilities, with perspective correction and
40texture objects.
41
42- 32 bit float only arithmetic.
43
44- Very small: compiled code size of about 40 kB on x86. The file
45  src/zfeatures.h can be used to remove some unused features from
46  TinyGL.
47
48- C sources for GCC on 32/64 bit architectures. It has been tested
49succesfully on x86-Linux and sparc-Solaris.
50
51Examples:
52---------
53
54I took three simple examples from the Mesa package to test the main
55functions of TinyGL. You can link them to either TinyGL, Mesa or any
56other OpenGL/GLX implementation. You can also compile them with
57Microwindows.
58
59- texobj illustrates the use of texture objects. Its shows the speed
60of TinyGL in this case.
61
62- glutmech comes from the GLUT packages. It is much bigger and slower
63because it uses the lightening. I have just included some GLU
64functions and suppressed the GLUT related code to make it work. It
65shows the display list handling of TinyGL in particular. You can look
66at the source code to learn the keys to move the robot. The key 't'
67toggles between shaded rendering and wire frame.
68
69- You can download and compile the VReng project to see that TinyGL
70has been successfully used in a big project
71(http://www-inf.enst.fr/vreng).
72
73Architecture:
74-------------
75
76TinyGL is made up four main modules:
77
78- Mathematical routines (zmath).
79
80- OpenGL-like emulation (zgl).
81
82- Z buffer and rasterisation (zbuffer).
83
84- GLX interface (zglx).
85
86To use TinyGL in an embedded system, you should look at the GLX layer
87and modify it to suit your need. Adding a more user friendly
88developper layer (as in Mesa) may be useful.
89
90Notes - limitations:
91--------------------
92
93- See the file 'LIMITATIONS' to see the current functions supported by the API.
94
95- The multithreading could be easily implemented since no global state
96is maintainted. The library gets the current context with a function
97which can be modified.
98
99- The lightening is not very fast. I supposed that in most games the
100lightening is computed by the 3D engine.
101
102- Some changes are needed for 64 bit pointers for the handling of
103arrays of float with the GLParam union.
104
105- List sharing is partialy supported in the source, but not by the
106current TinyGLX implementation (is it really useful ?).
107
108- No user clipping planes are supported.
109
110- No color index mode (no longer useful !)
111
112- The mipmapping is not implemented.
113
114- The perspecture correction in the mapping code does not use W but
1151/Z. In any 'normal scene' it should work.
116
117- The resizing of the viewport in TinyGLX ensures that the width and
118the height are multiples of 4. This is not optimal because some pixels
119of the window may not be refreshed.
120
121Why ?
122-----
123
124TinyGL was developped as a student project for a Virtual Reality
125network system called VReng (see the VReng home page at
126http://www-inf.enst.fr/vreng).
127
128At that time (January 1997), my initial project was to write my own 3D
129rasterizer based on some old sources I wrote. But I realized that it
130would be better to use OpenGL to work on any platform. My problem was
131that I wanted to use texture mapping which was (and is still) quite
132slower on many software OpenGL implementation. I could have modified
133Mesa to suit my needs, but I really wanted to use my old sources for
134that project.
135
136I finally decided to use the same syntax as OpenGL but with my own
137libraries, thinking that later it could ease the porting of VReng to
138OpenGL.
139
140Now VReng is at last compatible with OpenGL, and I managed to patch
141TinyGL so that VReng can still work with it without any modifications.
142
143Since TinyGL may be useful for some people, especially in the world of
144embedded designs, I decided to release it 'as is', otherwise, it would
145have been lost on my hard disk !
146
147------------------------------------------------------------------------------
148* OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
149------------------------------------------------------------------------------
150Fabrice Bellard.
Note: See TracBrowser for help on using the repository browser.