Main Page | Data Structures | File List | Data Fields | Globals

render.h

Go to the documentation of this file.
00001 //  KISS Renderer
00002 //  Copyright (C) 2003 Ben Tayler (bjt@users.playstation2-linux.com)
00003 //
00004 //  This library is free software; you can redistribute it and/or
00005 //  modify it under the terms of the GNU Lesser General Public
00006 //  License as published by the Free Software Foundation; either
00007 //  version 2.1 of the License, or (at your option) any later version.
00008 //
00009 //  This library is distributed in the hope that it will be useful,
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 //  Lesser General Public License for more details.
00013 //
00014 //  You should have received a copy of the GNU Lesser General Public
00015 //  License along with this library; if not, write to the Free Software
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 
00019 #include <stdio.h>
00020 #include <stdlib.h>
00021 #include <math.h>
00022 #include <malloc.h>
00023 
00024 #include <sps2lib.h>
00025 #include <sps2tags.h>
00026 #include <sps2util.h>
00027 #include <sps2regstructs.h>
00028 
00029 #include <geommath/geommath.h>
00030 #include <intmd/intmdloader.h>
00031 #include <samples/common/p2lassert.h>
00032 
00033 #include "render_buffer.h"
00034 #include "render_dma.h"
00035 #include "render_load.h"
00036 #include "render_matrix.h"
00037 #include "render_vif.h"
00038 #include "render_util.h"
00039 
00040 
00041 #define BLOCK_SIZE 4096 // SPS2 provides 4K blocks
00042 #define DATABUFFER_SIZE (8192 * 1024) // global data buffer
00043 #define CHAINBUFFER_SIZE 4096 // 4K global chain buffers
00044 
00045 #define VERTS_PER_PACKET 84
00046 
00047 
00048 // declare global buffer struct
00049 typedef struct {
00050         void *baseaddr; 
00051         void *nextfreeaddr; 
00052         sps2Memory_t *sps2info; 
00053 
00054 } bufferinfo;
00055 
00056 // declare quadword union
00057 typedef union
00058 {
00059         sps2uint128 i128; 
00060         sps2uint64 i64[2]; 
00061         sps2uint32 i32[4]; 
00062 
00063 } qw_t;
00064 
00065 
00066 #define Render_SetBGColour(x) DPUT_GS_BGCOLOR(x)
00067 
00071 
00075 
00079 
00083 
00088 
00092 
00096 
00099 

Generated on Wed Apr 28 20:49:12 2004 for KISS Renderer by doxygen 1.3.6-20040222