less_retarded_wiki

main page, file list, single page HTML, source, report, wiki last updated on 02/06/23

Small3dlib

Small3dlib (S3L) is a very portable LRS/suckless single header 3D software renderer library written by drummyfish in the C programming language. It is very efficient and runs on many resource-limited computers such as embedded open consoles. It is similar to TinyGL, but yet more simple. Small3dlib is public domain free software under CC0.

The repository is available at https://codeberg.org/drummyfish/small3dlib and https://gitlab.com/drummyfish/small3dlib.

Small3dlib can be used for rendering 3D graphics on almost any device as it is written in pure C99 without any software and hardware dependencies; it doesn't use the standard library, floating point or GPU. It is also very flexible, not forcing any preprogrammed shaders -- instead it only computes which pixels should be rasterized and lets the programmer of the main application decide himself what should be done with these pixels (this is typically applying some shading and writing them to screen).

Some of the rendering features include:

                                                            ##x
                                                         ####xx
                                                      ######xxxx
                ..xx                               ########xxxxx
             .....xxx                           ##########xxxxxx
          .......xxxxx                       #############xxxxxxx
          .......xxxxxxx                    #############xxxxxxxx
          .......xxxxxxxx                  #############xxxxxxxxxx
         .......xxxxxxxxxx                #############xxxxxxxxxxx
         .......xxxxxxxxxxx              #############xxxxxxxxxxxx
        ........xxxxxxxxxxxxx           ##############xxxxxxxxxxxxx
        .......xxxxxxxxxxxxxxx         ##############xxxxxxxxxxxxxx
        .......xxxxxxxxxxxxxxxx       ##############xxxxxxxxxxxxxxxx
       ........xxxxxxxxxxxxxxxxx     ##############xxxxxxxxxxxxxxxxx
       .......xxxxxxxxxxxxxxxxxx    ##############xxxxxxxxxxxxxxxxxx
      ........xxxxxxxxxxxxxxxxxx   ................xxxxxxxxxxxxxxxxxx
      ........xxxxxxxxxxxxxxxxxx    ................xxxxxxxxxxxxxxxxx
      .......xxxxxxxxxxxxxxxxxx      ...............xxxxxxxxxxxxxxxxx
     ........xxxxxxxxxxxxxxxxxx      ................xxxxxxxxxxxxxxxx
     ........xxxxxxxxxxxxxxxxxx       ...............xxxxxxxxxxxxxxx
    ........xxxxxxxxxxxxxxxxxxx        ...............xxxxxxxxxxxxxx
    ........xxxxxxxxxxxxxxxxxx         ................xxxxxxxxxxxx
    ........xxxxxxxxxxxxxxxxxx          ...............xxxxxxxxxxxx
   ........xxxxxxxxxxxxxxxxxxx           ...............xxxxxxxxxx
   ........xxxxxxxxxxxxxxxxxxx           ...............xxxxxxxxxx
  .........xxxxxxxxxxxxxxxxxx             ...............xxxxxxxx
         #xxxxxxxxxxxxxxxxxxx              ..............xxxxxxxx
               #xxxxxxxxxxxxx              ...............xxxxxx
                      xxxxxxx                 .............xxxxx
                                                 ..........xxxx
                                                    ........xxx
                                                       .....xx
                                                          ...x

Simple ASCII rendering made with small3dlib.


All content available under CC0 1.0 (public domain). Send comments and corrections to drummyfish at disroot dot org.