Search
lxdream.org :: lxdream/src/pvr2/pvr2.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.h
changeset 635:76c63aac3590
prev561:533f6b478071
next645:a7392098299c
author nkeynes
date Thu Feb 14 13:54:11 2008 +0000 (13 years ago)
branchlxdream-render
permissions -rw-r--r--
last change Commit render work in progress. Main changes:
* Preliminary OSMesa support
* Move the generic gl code out to pvr2/
* Implement scene data structure + reader
* Remove the 1/z adjustments
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.h Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/src/pvr2/pvr2.h Thu Feb 14 13:54:11 2008 +0000
1.3 @@ -16,7 +16,11 @@
1.4 * GNU General Public License for more details.
1.5 */
1.6
1.7 -#include "dream.h"
1.8 +#ifndef lxdream_pvr2_H
1.9 +#define lxdream_pvr2_H 1
1.10 +
1.11 +#include <stdio.h>
1.12 +#include "lxdream.h"
1.13 #include "mem.h"
1.14 #include "display.h"
1.15 #include "pvr2/pvr2mmio.h"
1.16 @@ -240,6 +244,8 @@
1.17
1.18 /********************************* Renderer ******************************/
1.19
1.20 +void pvr2_read_scene( void );
1.21 +
1.22 /**
1.23 * Render the current scene stored in PVR ram to the GL back buffer.
1.24 */
1.25 @@ -260,7 +266,7 @@
1.26 void pvr2_render_tilebuffer( int width, int height, int clipx1, int clipy1,
1.27 int clipx2, int clipy2 );
1.28
1.29 -float pvr2_render_find_maximum_z();
1.30 +void pvr2_render_find_z_range( float *min, float *max );
1.31
1.32 void pvr2_render_getsize( int *x, int *y );
1.33
1.34 @@ -293,7 +299,6 @@
1.35
1.36 void render_autosort_tile( pvraddr_t tile_entry, int render_mode, gboolean cheap_modifier_mode );
1.37
1.38 -
1.39 /****************************** Texture Cache ****************************/
1.40
1.41 /**
1.42 @@ -377,3 +382,29 @@
1.43 extern int pvr2_render_colour_format[8];
1.44
1.45 float halftofloat(uint16_t half);
1.46 +
1.47 +#define CULL_NONE 0
1.48 +#define CULL_SMALL 1
1.49 +#define CULL_CCW 2
1.50 +#define CULL_CW 3
1.51 +
1.52 +#define SEGMENT_END 0x80000000
1.53 +#define SEGMENT_ZCLEAR 0x40000000
1.54 +#define SEGMENT_SORT_TRANS 0x20000000
1.55 +#define SEGMENT_START 0x10000000
1.56 +#define SEGMENT_X(c) (((c) >> 2) & 0x3F)
1.57 +#define SEGMENT_Y(c) (((c) >> 8) & 0x3F)
1.58 +#define NO_POINTER 0x80000000
1.59 +#define IS_TILE_PTR(p) ( ((p)&NO_POINTER) == 0 )
1.60 +#define IS_LAST_SEGMENT(s) (((s)->control) & SEGMENT_END)
1.61 +
1.62 +struct tile_segment {
1.63 + uint32_t control;
1.64 + pvraddr_t opaque_ptr;
1.65 + pvraddr_t opaquemod_ptr;
1.66 + pvraddr_t trans_ptr;
1.67 + pvraddr_t transmod_ptr;
1.68 + pvraddr_t punchout_ptr;
1.69 +};
1.70 +
1.71 +#endif /* !lxdream_pvr2_H */
.