Search
lxdream.org :: lxdream/src/pvr2/pvr2.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.h
changeset 319:5392aed6a982
prev315:2d8ba198d62c
next322:354407942957
author nkeynes
date Wed Jan 24 08:11:14 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Add support for quads (auto-calculated 4th vertex)
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.h Tue Jan 23 11:19:32 2007 +0000
1.2 +++ b/src/pvr2/pvr2.h Wed Jan 24 08:11:14 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.h,v 1.25 2007-01-23 11:19:32 nkeynes Exp $
1.6 + * $Id: pvr2.h,v 1.26 2007-01-24 08:11:14 nkeynes Exp $
1.7 *
1.8 * PVR2 (video chip) functions and macros.
1.9 *
1.10 @@ -208,7 +208,6 @@
1.11 gboolean pvr2_render_buffer_invalidate( sh4addr_t addr );
1.12
1.13
1.14 -
1.15 /**************************** Tile Accelerator ***************************/
1.16 /**
1.17 * Process the data in the supplied buffer as an array of TA command lists.
1.18 @@ -266,6 +265,24 @@
1.19 void pvr2_render_tilebuffer( int width, int height, int clipx1, int clipy1,
1.20 int clipx2, int clipy2 );
1.21
1.22 +
1.23 +/**
1.24 + * Structure to hold a complete unpacked vertex (excluding modifier
1.25 + * volume parameters - generate separate vertexes in that case).
1.26 + */
1.27 +struct vertex_unpacked {
1.28 + float x,y,z;
1.29 + float u,v; /* Texture coordinates */
1.30 + float rgba[4]; /* Fragment colour (RGBA order) */
1.31 + float offset_rgba[4]; /* Offset color (RGBA order) */
1.32 +};
1.33 +
1.34 +void render_unpacked_vertex_array( uint32_t poly1, struct vertex_unpacked *vertexes[],
1.35 + int num_vertexes );
1.36 +
1.37 +void render_vertex_array( uint32_t poly1, uint32_t *vertexes[], int num_vertexes,
1.38 + int vertex_size, int render_mode );
1.39 +
1.40 /****************************** Texture Cache ****************************/
1.41
1.42 /**
1.43 @@ -309,6 +326,7 @@
1.44 #define POLY1_CULL_MODE(poly1) (((poly1)>>27)&0x03)
1.45 #define POLY1_TEXTURED(poly1) (((poly1)&0x02000000))
1.46 #define POLY1_SPECULAR(poly1) (((poly1)&0x01000000))
1.47 +#define POLY1_GOURAUD_SHADED(poly1) ((poly1)&0x00800000)
1.48 #define POLY1_SHADE_MODEL(poly1) (((poly1)&0x00800000) ? GL_SMOOTH : GL_FLAT)
1.49 #define POLY1_UV16(poly1) (((poly1)&0x00400000))
1.50 #define POLY1_SINGLE_TILE(poly1) (((poly1)&0x00200000))
.