open_toontown_panda3d/panda/src/tinydisplay
rdb 26fcf131c9 Merge branch 'master' into input-overhaul 2018-11-25 17:10:31 +01:00
..
README.txt Partially apply typo fix patch I found somewhere on the web, by someone named Christoph Korn 2010-11-16 08:58:45 +00:00
clip.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
config_tinydisplay.cxx general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
config_tinydisplay.h New file headers, new comment style 2016-02-17 17:47:48 +01:00
error.cxx a few more warning squelches 2009-02-19 00:23:08 +00:00
image_util.cxx stdfloat_double 2011-10-10 05:25:10 +00:00
init.cxx general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
memory.cxx proper mem accounting 2008-07-10 22:48:16 +00:00
p3tinydisplay_composite1.cxx Remove executable permissions from files that don't need them 2015-04-05 15:41:49 +02:00
p3tinydisplay_composite2.cxx Remove executable permissions from files that don't need them 2015-04-05 15:41:49 +02:00
specbuf.cxx general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
srgb_tables.cxx Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
srgb_tables.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
store_pixel.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
store_pixel.h general: fix various compiler warnings and issues exposed thereby 2018-05-30 11:09:35 +02:00
store_pixel.py Cleanup trailing whitespace 2015-12-13 10:08:41 -05:00
store_pixel_code.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
store_pixel_table.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
td_light.cxx general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
td_texture.cxx composite build 2008-09-12 18:47:42 +00:00
tinyGeomMunger.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyGeomMunger.cxx New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyGeomMunger.h New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyGraphicsBuffer.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyGraphicsBuffer.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinyGraphicsBuffer.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyGraphicsStateGuardian.I general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
tinyGraphicsStateGuardian.cxx display: make PStats clear collectors per-window 2018-11-19 20:02:38 +01:00
tinyGraphicsStateGuardian.h cull: remove GeomMunger stored on CullableObject 2017-07-03 11:47:59 +02:00
tinyOffscreenGraphicsPipe.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyOffscreenGraphicsPipe.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinyOffscreenGraphicsPipe.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyOsxGraphicsPipe.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyOsxGraphicsPipe.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinyOsxGraphicsPipe.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyOsxGraphicsWindow.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyOsxGraphicsWindow.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyOsxGraphicsWindow.mm Merge branch 'master' into input-overhaul 2018-06-08 15:23:47 +02:00
tinySDLGraphicsPipe.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinySDLGraphicsPipe.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinySDLGraphicsPipe.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinySDLGraphicsWindow.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinySDLGraphicsWindow.cxx Merge branch 'master' into input-overhaul 2018-06-23 23:24:09 +02:00
tinySDLGraphicsWindow.h general: Distinguish local/system includes 2018-11-10 18:00:10 -07:00
tinyTextureContext.I general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
tinyTextureContext.cxx general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
tinyTextureContext.h Merge branch 'release/1.9.x' 2016-09-28 00:14:21 +02:00
tinyWinGraphicsPipe.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyWinGraphicsPipe.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinyWinGraphicsPipe.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyWinGraphicsWindow.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyWinGraphicsWindow.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinyWinGraphicsWindow.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyXGraphicsPipe.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyXGraphicsPipe.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
tinyXGraphicsPipe.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
tinyXGraphicsWindow.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
tinyXGraphicsWindow.cxx Merge branch 'master' into input-overhaul 2018-06-23 23:24:09 +02:00
tinyXGraphicsWindow.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
vertex.cxx general: Distinguish local/system includes 2018-11-10 18:00:10 -07:00
zbuffer.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
zbuffer.h M_alpha now no longer squares the alpha component it writes to the framebuffer. 2016-06-28 22:13:33 +02:00
zdither.cxx Remove use of deprecated "register" keyword 2015-08-07 18:56:58 +02:00
zfeatures.h general: fix various compiler warnings and issues exposed thereby 2018-05-30 11:09:35 +02:00
zgl.h Fix various build issues 2015-02-11 14:16:21 +01:00
zline.cxx integrate changes from Schell Games (plus some tab character fixes) 2009-06-01 21:51:15 +00:00
zline.h Remove use of deprecated "register" keyword 2015-08-07 18:56:58 +02:00
zmath.cxx Remove French accent encoded in who-knows-what 2014-02-25 07:52:32 +00:00
zmath.h stdfloat_double 2011-10-10 05:25:10 +00:00
ztriangle.h general: fix many compilation warnings in GCC 8 2018-06-19 00:37:28 +02:00
ztriangle.py Cleanup trailing whitespace 2015-12-13 10:08:41 -05:00
ztriangle_1.cxx fix build issues on windows 2009-03-24 18:42:09 +00:00
ztriangle_2.cxx fix build issues on windows 2009-03-24 18:42:09 +00:00
ztriangle_3.cxx fix build issues on windows 2009-03-24 18:42:09 +00:00
ztriangle_4.cxx fix build issues on windows 2009-03-24 18:42:09 +00:00
ztriangle_code_1.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
ztriangle_code_2.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
ztriangle_code_3.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
ztriangle_code_4.h Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
ztriangle_table.cxx Add support for sRGB framebuffers and blending to tinydisplay renderer. 2014-10-08 11:34:41 +00:00
ztriangle_table.h Remove executable permissions from files that don't need them 2015-04-05 15:41:49 +02:00
ztriangle_two.h general: fix many compilation warnings in GCC 8 2018-06-19 00:37:28 +02:00

README.txt

The code in this directory was lifted from TinySDGL, which was itself
modified from TinyGL, a project originally written by Fabrice Bellard.
The README and LICENSE files that accompany that project are included
here.

We have modified the original TinyGL code to interface more directly
with the Panda3D constructs, eliminating the thin OpenGL interface
layer.  We have also added features we deemed necessary, such as
texture modulate mode and alpha blending.


-------------------------------------------------------------------
Original TinySDGL/TinyGL LICENSE

Copyright notice:

 (C) 1997-1998 Fabrice Bellard

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product and its documentation 
     *is* required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

If you redistribute modified sources, I would appreciate that you
include in the files history information documenting your changes.


-------------------------------------------------------------------
Original TinySDGL/TinyGL README

TinyGL 0.4 (c) 1997-2002 Fabrice Bellard.
TinySDGL 0.5, 2005 a port to libSDL by Gerald Franz (gfz@o2online.de).

General Description:
--------------------

TinyGL is intended to be a very small implementation of a subset of
OpenGL* for embedded systems or games. It is a software only
implementation. Only the main OpenGL calls are implemented. All the
calls I considered not important are simply *not implemented*.

The main strength of TinyGL is that it is fast and simple because it
has not to be exactly compatible with OpenGL. In particular, the
texture mapping and the geometrical transformations are very fast.

The main features of TinyGL are:

- Header compatible with OpenGL (the headers are adapted from the very good
Mesa by Brian Paul et al.)

- Zlib-like licence for easy integration in commercial designs (read
the LICENCE file).

- Examples that show the integration into the platform-independent 
  libSDL (http://www.libsdl,org)

- Easy porting to further platforms, since all platform-specific code has 
  been moved from the core library into the examples.

- OpenGL like lighting.

- Complete OpenGL selection mode handling for object picking.

- 16 bit Z buffer. 16/24/32 bit RGB rendering. High speed dithering to
paletted 8 bits if needed. High speed conversion to 24 bit packed
pixel or 32 bit RGBA if needed.

- Fast Gouraud shadding optimized for 16 bit RGB.

- Fast texture mapping capabilities, with perspective correction and
texture objects.

- 32 bit float only arithmetic.

- Very small: compiled (and stripped) code size of about 40 kB on x86. 
  The file include/zfeatures.h can be used to remove some unused 
  features from TinyGL.

- C sources for GCC on 32/64 bit architectures. It has been tested
successfully on x86-Linux and MS Windows.

Examples:
---------

I took three simple examples from the Mesa package to test the main
functions of TinyGL. You can link them to either TinyGL, Mesa or any
other OpenGL implementation.

- texobj illustrates the use of texture objects. Its shows the speed
of TinyGL in this case (example not included in TinySDGL).

- You can download and compile the VReng project to see that TinyGL
has been successfully used in a big project
(http://www-inf.enst.fr/vreng).

Architecture:
-------------

TinyGL is made up four main modules:

- Mathematical routines (zmath).

- OpenGL-like emulation (zgl).

- Z buffer and rasterisation (zbuffer).

To use TinySDGL in a further system, you should look at the examples
and replace the SDL specific code by corresponding commands.

Notes - limitations:
--------------------

- 24 BIT packed pixel format seems not to work correctly under libSDL.

- See the file 'LIMITATIONS' to see the current functions supported by the API.

- Multithreading could be easily implemented since no global state
is maintained. The library gets the current context with a function
which can be modified.

- Lightening is not very fast. I suppose that in most games the
lightening is computed by the 3D engine.

- Some changes are needed for 64 bit pointers for the handling of
arrays of float with the GLParam union.

- No user clipping planes are supported.

- No color index mode (no longer useful !)

- The mipmapping is not implemented.

- The perspecture correction in the mapping code does not use W but
1/Z. In any 'normal scene' it should work.

Why ?
-----

TinyGL was developed as a student project for a Virtual Reality
network system called VReng (see the VReng home page at
http://www-inf.enst.fr/vreng).

At that time (January 1997), my initial project was to write my own 3D
rasterizer based on some old sources I wrote. But I realized that it
would be better to use OpenGL to work on any platform. My problem was
that I wanted to use texture mapping which was (and is still) quite
slower on many software OpenGL implementation. I could have modified
Mesa to suit my needs, but I really wanted to use my old sources for
that project. 

I finally decided to use the same syntax as OpenGL but with my own
libraries, thinking that later it could ease the porting of VReng to
OpenGL.

Now VReng is at last compatible with OpenGL, and I managed to patch
TinyGL so that VReng can still work with it without any modifications.

Since TinyGL may be useful for some people, especially in the world of
embedded designs, I decided to release it 'as is', otherwise, it would
have been lost on my hard disk !

------------------------------------------------------------------------------
* OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
------------------------------------------------------------------------------
Fabrice Bellard. (Minor changes by Gerald Franz)