Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
dacb520
Add initial pingo files
Apr 22, 2024
272eef7
Add doc from OTF, to be modified
Apr 22, 2024
2ccc715
Initial updates to doc for 3D
Apr 22, 2024
e2eba8c
add notes on subcommmand 0
Apr 22, 2024
841c416
interim; starting to add code
Apr 22, 2024
a0b102b
Update vdu_pingo.md
TurboVega Apr 22, 2024
2631836
clean up compilation
TurboVega Apr 23, 2024
1fdc1b3
started referencing pingo files
TurboVega Apr 23, 2024
3ae3eb2
cleanup struct defs
TurboVega Apr 23, 2024
86b1693
creating control members
TurboVega Apr 23, 2024
a71f451
adding more control members
TurboVega Apr 23, 2024
f0b3183
Update vdu_pingo.md
TurboVega Apr 23, 2024
1e7bcc6
interim checkin
Apr 23, 2024
637bf12
slowly filling in code
Apr 23, 2024
f15cb81
filling in functions
Apr 23, 2024
609dccf
working on conversions
Apr 23, 2024
7e055ea
added render code
Apr 23, 2024
4a3ebce
remove unwanted file
Apr 23, 2024
a067e0d
starting to test stuff
Apr 23, 2024
63807fe
debugging
TurboVega Apr 24, 2024
91ee392
got through the test app
Apr 24, 2024
9056467
runs but outputs zeros
Apr 24, 2024
bf886ea
draws a teapot
Apr 24, 2024
0fb44c4
canvas size of 64x64
Apr 24, 2024
f43d593
rotating
Apr 24, 2024
8916f2b
Merge branch 'main' into pingo3D
May 6, 2024
0695de5
starting to add camera subcommands
May 6, 2024
920290d
interim; adding subcommands
May 6, 2024
8b7382c
debugging edits
May 6, 2024
c42a64a
has most camera settings commands
May 7, 2024
c63e4c3
fix bugs and renumber sample app
May 7, 2024
40d0f31
turn OFF DEBUG flag
TurboVega Jun 10, 2024
0f2fa94
fix typos
TurboVega Jun 16, 2024
bf185e8
Merge branch 'main' into pingo3D
TurboVega Jun 17, 2024
4e22ecc
change buffer code from 48h to 49h
TurboVega Jun 17, 2024
8e547a3
fix color reversal
TurboVega Jun 19, 2024
8464d3d
post fighter aircraft model
TurboVega Jun 20, 2024
e772042
added OSCLI/RST demo
TurboVega Jun 26, 2024
a774f73
started obj2vdu app
TurboVega Jun 26, 2024
643bb27
interim checkin
TurboVega Jun 26, 2024
e72e86c
first checkin of conversion app
TurboVega Jun 26, 2024
8c17ae0
working on orientation sample
TurboVega Jun 27, 2024
5d1eb05
some vertex fixes
TurboVega Jun 27, 2024
a6dc931
adding more objects
TurboVega Jun 27, 2024
04206b3
fix copy monster
TurboVega Jun 27, 2024
3a80195
got 3 arrows rotating
TurboVega Jun 27, 2024
0c3f168
add arrow obj
TurboVega Jun 27, 2024
d29ca53
rgb arrows
TurboVega Jun 27, 2024
c7bfc58
support texture coords for object
TurboVega Jun 27, 2024
f0a1292
invert Y for light
TurboVega Jun 27, 2024
f481481
added lara.bas
TurboVega Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions video/agon.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
#define BUFFERED_COMPRESS 0x40 // Compress blocks from multiple buffers into one buffer
#define BUFFERED_DECOMPRESS 0x41 // Decompress blocks from multiple buffers into one buffer
#define BUFFERED_EXPAND_BITMAP 0x48 // Expand a bitmap buffer
#define BUFFERED_PINGO_3D 0x49 // Configure a 3D scene or render to a bitmap

#define BUFFERED_DEBUG_INFO 0x80 // Get debug info about a buffer

Expand Down
121 changes: 121 additions & 0 deletions video/pingo/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
30 changes: 30 additions & 0 deletions video/pingo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# pingo

Pingo is a low level 2D/3D software graphics library. It uses no dynamically allocated memory and provides a simple low level backend interface to implement for your platform. This library can easily be compiled for many different platforms since it has no dependencies except for a working C compiler, it has been tested on Windows, Linux x86, Linux ARM, ESP32, Arm Cortex M3 and even RISC V CPUs.

The cmake project contains targets that build examples that show 3D rendering on different platforms.
```
git clone git@github.com:fededevi/pingo.git
cd pingo
mkdir build && cd build
cmake .. && make
```

If you compile on Linux the default cmake project will build 3 example binaries:
- linux_window -> An example that renders to an X11 window
- linux_framebuffer -> An example that renders to a framebuffer device
- linux_terminal -> An example that renders to the terminal

If you compile on Windows the default cmake project will build 2 example binaries:
- win_window -> An example that renders to a Windows window
- win_terminal -> An example that renders to the terminal

Some backends like the linux framebuffer require exact dimension and pixel format, see pixel.h and this line in the example's main.c:
```
int main(){
Vec2i size = {300, 150};
```

#### An example with texture and per-triangle shading
![Example](/public/viking.png)
Loading