AminetAminet
Search:
81914 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/src/Cow3D.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Draw a textured 3D cow with Warp3D/Nova
Author:thellier at free.fr (Alain Thellier)
Uploader:thellier free fr
Type:dev/src
Version:6
Replaces:dev/src/Cow3D.lha
Requires:Warp3D or Wazp3D library; Warp3DNova.library
Architecture:amigaos >= 3.0.0;
Date:2017-01-13
Download:http://aminet.net/dev/src/Cow3D.lha - View contents
Readme:http://aminet.net/dev/src/Cow3D.readme
Downloads:2235
DESCRIPTION 
The ultimate Warp3D & Nova testing tool (now for Aros & AmigaOS4 ppc)
It draw a textured cow object then draw upside a quad with a cosmos texture
Compiled with GCC. Use Warp3D library (needed) or Warp3DNova.library (optionnal)
Also demonstrate how to code efficiently Warp3D or Nova for OS3 or OS4
If Warp3D & Nova was too difficult for you this example will change your mind 

French: Le prog ultime pour tester Warp3D ou Nova  en traçant une vache 3D
texturee puis trace par dessus un rectangle a texture de cosmos Compile avec
GCC. Bibliotheque Warp3D necessaire Montre comment programmer efficacement
Warp3D & Nova pour OS3 ou OS4
Si Warp3D & Nova etait trop complique pour toi Tu changera d'avis avec cet
exemple

v3.0 Sept  2011: Draw FPS correctly on Aros too. Now works with Wazp3D using
"hard overlay" v4.0 March 2012: Try to use W3D_InterleavedArray() on OS4
									
v5.0 Sept  2012: Use W3D_DrawElement() on OS4 ==> faster								
v6.0 Oct   2016: Let the cow turn more before computing FPS Now can also use
Nova as renderer and test Nova (type "Cow3D6 n")							
Please note that Cow3D is a very simple program that draw simply a cow without
lighting/clipping/perspective so in the better conditions for the simple Warp3D.
Therefore the speed difference Nova/Warp3D is not so important in this Cow3D
special case.
SAM460: Nova 457 FPS Warp3D 138 FPS so around X3.3

LICENSE 
GNU General Public License (GNU GPL) 
Author: Alain THELLIER - Paris - FRANCE - 2016

INSTALLATION 
Install Warp3D.library or Wazp3D.library
Install Warp3DNova (optionnal)
Copy Cow3D-Amiga and the textures Cow_256X256X32.RAW & Cosmos_256X256X32.RAW
where you want

USAGE This program is used to test Nova/Warp3D speed, states, functionnalities &
zbuffer Can also serve to test Nova when lauched with ""Cow3D6 n" or via given
icon

Better speed results are obtained with keys 'o' 'e' 'b' and srcfunc=1  dstfunc=0
(Warp3D only dont concern Nova)

It print all the possible informations for your Nova/Warp3D driver(s) 
It draw a textured cow object then draw upside a quad with a cosmos texture
So you can check if a given 3d-driver can really do a feature

OPTIONS KEYS

'f' display frame per seconds and infos on screen

ANIMATION & SPEED:
-----------------------------------------------------
'o' use an optimized rotation function  (faster) (default) (Warp3D only dont
concern Nova)

'r' rotate object or not

'b' Allocate a big points-buffer. Compute & store the objects for each frame.
Then use the buffered objects 	No more computation = faster . Only the
3d-hardware is used. 	WARNING: this options use lots of memory (around 5 MB)
(Warp3D only dont concern Nova)

ZBUFFER:
-----------------------------------------------------
'z' use zbuffer (default yes)

'u' update zbuffer (default yes) (need to use zbuffer)

'1' to '8' change zbuffer test (default 2 = Z_LESS)

'Z' zbuffer tests draw some test-rectangles & zspans Zbuffer is cleared with
z=0.90 so depending on zmode/zupdate the 7 quads,dotted line or line should
appear 	1) write a zspan in zbuffer at z=0.9 (with mask 1 pixel,show 1 pixel)
but on the the test-rectangles use same z values as the rectangles 	2) write a
zspan in zbuffer at z=0.5 in the midle of the test-rectangles 	3) write a zspan
in zbuffer from  z=0.01 to 0.99  
	4) draw 7 quads as various depth with various colors (z values =
0.10,0.20,0.30,0.40,0.90,0.94,0.98} 	5) draw 7 quads at the same depth = sticked
to the face = appears if use a z equal zmode 	WARNING: 1 to 3 dont works on most
drivers. Nova unimplemented

'g' grey = read the zbuffer as grey values
	WARNING: this options dont works on most drivers
	if fail draw as red. Nova unimplemented

DRAW METHOD:
-----------------------------------------------------
't' triangle - draw with W3D_DrawTriangle() = slower . For Nova same as 'e'

'e' elements - draw with W3D_DrawElements() = faster (default) 

'p' points - draw as points with W3D_DrawPoint() = slow  
	WARNING: this options dont works some drivers
 
'l' lines - draw as lines with W3D_DrawLineLoop() = slow  
	WARNING: this options dont works some drivers & Nova

'0' zero - draw as big points/lines (use it with 'l' or 'p') = very slow
	WARNING: this options dont works on some drivers & Nova

OTHERS:
-----------------------------------------------------
'c' use colors not texture (default no). Nova unimplemented

'h' hide back faces (=culling) (default yes) 
	WARNING: this options dont works with some drivers

DRAW TESTS:
-----------------------------------------------------
'P' point test : draw a small/big point & draw a small/big line (use it also
with 'c') 	WARNING: this options dont works on some drivers. Nova unimplemented

'L' line  test : same as 'P'. Nova unimplemented

PATCHES:
-----------------------------------------------------
'w' warp3d is patched (default no)
	Reimplement the functions for drawing lines/points (but dont change
W3D_Drawelements() nor W3D_Drawarray())
	Implement Read/WriteZspan/Zpixel() but this dont works on most drivers
	WARNING: this options dont works on most drivers. Dont concern Nova

BLENDING & TEXENV:
-----------------------------------------------------
's'	change srcfunc 'd'	change dstfunc 'S' or 'D' change both srcfunc & dstfunc
(so typing 'D' 255 times show all possible effects)
then do W3D_SetBlendMode(context,srcfunc,dstfunc);

default is srcfunc=1 dstfunc=1

For srcfunc=1 dstfunc=0 dont display the cosmos quad so the cow is still visible

Just remember:
src is cosmos-quad 
dst is cow-object & background

'm'	change texenvmode
then call 	W3D_SetTexEnv() with this texenvmode for the 2  textures
		envcolor for tex1 is green
		envcolor for tex2 is blue
Nova implementation via shaders is not 100% perfect






Contents of dev/src/Cow3D.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                 3662    6425  57.0% -lh5- 9e9c Oct 31 13:46 Cow3D6.info
[unknown]                  260     758  34.3% -lh5- dcd6 Oct 21 14:24 Cow3D6/build.sh
[unknown]                 2548    5504  46.3% -lh5- b84f Oct 21 14:24 Cow3D6/build.sh.info
[unknown]               179336  262144  68.4% -lh5- 7846 Aug  4  2011 Cow3D6/Cosmos_256X256X32.RAW
[unknown]                 2541    6005  42.3% -lh5- 5789 Oct 21 14:40 Cow3D6/Cow3D.readme
[unknown]                 3661    5815  63.0% -lh5- 106c Oct 21 14:41 Cow3D6/Cow3D.readme.info
[unknown]               101456  181524  55.9% -lh5- f1b6 Oct 21 14:42 Cow3D6/CoW3D6-os3
[unknown]                 2094    4712  44.4% -lh5- c9d0 Oct 21 13:46 Cow3D6/CoW3D6-os3.info
[unknown]               153248  319506  48.0% -lh5- 6d3d Oct 24 15:50 Cow3D6/CoW3D6-os4
[unknown]                   18      18 100.0% -lh0- 807f Oct  6 16:14 Cow3D6/Cow3D6-os4-Nova
[unknown]                 2549    5504  46.3% -lh5- 0e93 Oct 21 13:46 Cow3D6/Cow3D6-os4-Nova.info
[unknown]                 2087    4703  44.4% -lh5- b4c3 Oct 21 13:46 Cow3D6/CoW3D6-os4.info
[unknown]                17305   66576  26.0% -lh5- 8412 Oct 21 13:35 Cow3D6/CoW3D6.c
[unknown]                 7882   30397  25.9% -lh5- cac2 Oct 24 15:27 Cow3D6/Cow3D_Nova.h
[unknown]                89530  304103  29.4% -lh5- fb87 Oct  7 15:05 Cow3D6/Cow3D_Object.h
[unknown]               107606  262144  41.0% -lh5- 48f6 Aug  4  2011 Cow3D6/Cow_256X256X32.RAW
[unknown]                 1417    4975  28.5% -lh5- e1d2 Feb  1  2007 Cow3D6/cybergraphics.h
[unknown]                 3611   11933  30.3% -lh5- 69d8 Feb 11  2016 Cow3D6/gfx.h
[unknown]                 3147   11660  27.0% -lh5- 71f7 Nov 27  2015 Cow3D6/kazmath/mat3.c
[unknown]                 1278    3887  32.9% -lh5- eba3 Nov 27  2015 Cow3D6/kazmath/mat3.h
[unknown]                 5212   23566  22.1% -lh5- 0770 Nov 27  2015 Cow3D6/kazmath/mat4.c
[unknown]                 1412    4173  33.8% -lh5- 661c Nov 27  2015 Cow3D6/kazmath/mat4.h
[unknown]                 2676    7331  36.5% -lh5- a946 Nov 27  2015 Cow3D6/kazmath/plane.c
[unknown]                 1244    3192  39.0% -lh5- 101d Nov 27  2015 Cow3D6/kazmath/plane.h
[unknown]                 4612   16002  28.8% -lh5- 3040 Nov 27  2015 Cow3D6/kazmath/quaternion.c
[unknown]                 1555    5150  30.2% -lh5- 2122 Nov 27  2015 Cow3D6/kazmath/quaternion.h
[unknown]                 1023    2235  45.8% -lh5- ff69 Nov 27  2015 Cow3D6/kazmath/utility.c
[unknown]                 1163    2776  41.9% -lh5- 7917 Nov 27  2015 Cow3D6/kazmath/utility.h
[unknown]                 2316    6689  34.6% -lh5- 531e Nov 27  2015 Cow3D6/kazmath/vec2.c
[unknown]                 1580    4264  37.1% -lh5- fc40 Nov 27  2015 Cow3D6/kazmath/vec2.h
[unknown]                 3523   11822  29.8% -lh5- 5094 Nov 27  2015 Cow3D6/kazmath/vec3.c
[unknown]                 1639    4831  33.9% -lh5- 66c6 Nov 27  2015 Cow3D6/kazmath/vec3.h
[unknown]                 2118    6377  33.2% -lh5- 31ea Nov 27  2015 Cow3D6/kazmath/vec4.c
[unknown]                 1205    3053  39.5% -lh5- 108a Nov 27  2015 Cow3D6/kazmath/vec4.h
[unknown]                 2596   12488  20.8% -lh5- a07b Oct  4 14:31 Cow3D6/patches_for_Warp3D.h
[unknown]                  174     850  20.5% -lh5- de34 Oct 18 16:17 Cow3D6/shaders/build.sh
[unknown]                 2553    5504  46.4% -lh5- a116 Oct  3 13:37 Cow3D6/shaders/build.sh.info
[unknown]                  165     262  63.0% -lh5- 4fed Oct 10 10:49 Cow3D6/shaders/GL_BLEND.frag
[unknown]                  490    1216  40.3% -lh5- 34dc Oct 21 14:21 Cow3D6/shaders/GL_BLEND.frag.spv
[unknown]                  162     253  64.0% -lh5- 4ba4 Oct 21 14:17 Cow3D6/shaders/GL_DECAL.frag
[unknown]                  478    1160  41.2% -lh5- 4de5 Oct 21 14:21 Cow3D6/shaders/GL_DECAL.frag.spv
[unknown]                  254     473  53.7% -lh5- 03a6 Oct 21 14:20 Cow3D6/shaders/GL_FLAT.vert
[unknown]                  483    1076  44.9% -lh5- f8d3 Oct 21 14:21 Cow3D6/shaders/GL_FLAT.vert.spv
[unknown]                  130     177  73.4% -lh5- 3693 Oct 10 10:50 Cow3D6/shaders/GL_MODULATE.frag
[unknown]                  310     668  46.4% -lh5- 2325 Oct 21 14:21 Cow3D6/shaders/GL_MODULATE.frag.spv
[unknown]                  126     168  75.0% -lh5- 49b5 Oct  4 10:08 Cow3D6/shaders/GL_REPLACE.frag
[unknown]                  298     632  47.2% -lh5- 6207 Oct 21 14:21 Cow3D6/shaders/GL_REPLACE.frag.spv
[unknown]                  185     338  54.7% -lh5- 04f7 Oct 21 14:21 Cow3D6/shaders/GL_UNTRANSFORMED.vert
[unknown]                  462    1040  44.4% -lh5- 4e5c Oct 21 14:21 Cow3D6/shaders/GL_UNTRANSFORMED.vert.spv
[unknown]                11502   44116  26.1% -lh5- fef0 Feb 11  2016 Cow3D6/Warp3D.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        50 files  736882 1670175  44.1%            Jan 13 20:19

Aminet © 1992-2017 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>