#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <malloc.h>
#include <sps2lib.h>
#include <sps2tags.h>
#include <sps2util.h>
#include <sps2regstructs.h>
#include <geommath/geommath.h>
#include <intmd/intmdloader.h>
#include <samples/common/p2lassert.h>
#include "render_buffer.h"
#include "render_dma.h"
#include "render_load.h"
#include "render_matrix.h"
#include "render_vif.h"
#include "render_util.h"
Go to the source code of this file.
Data Structures | |
struct | bufferinfo |
Information about a buffer. More... | |
union | qw_t |
A union to allow easy access to the fields of a uint128 . More... | |
Defines | |
#define | BLOCK_SIZE 4096 |
Maximum size (in bytes) of a DMA block. | |
#define | DATABUFFER_SIZE (8192 * 1024) |
Size (in bytes) of the global data buffer. | |
#define | CHAINBUFFER_SIZE 4096 |
Size (in bytes) of the global DMA chain buffer. | |
#define | VERTS_PER_PACKET 84 |
Maximum number of vertices per VIF packet. | |
#define | Render_SetBGColour(x) DPUT_GS_BGCOLOR(x) |
A macro to remap SPS2's set background colour function. |
This is the only header file you need to #include
to use the renderer in your code.
|
Maximum size (in bytes) of a DMA block. This value should be equal to the size of the DMA blocks provided by SPS2. Data to be transferred via DMA must be located in a physically contiguous block. The current version of SPS2 provides 4K blocks of contiguous memory. |
|
Size (in bytes) of the global DMA chain buffer.
The global DMA chain buffer contains per-frame DMA chain mode tags. It is double buffered for rendering. Increase this value if you receive a |
|
Size (in bytes) of the global data buffer.
The global data buffer contains static data (data that does not change on a per-frame basis). This buffer must be large enough to hold geometry and texture data for the model(s) to be rendered. Increase this value if you receive a |
|
A macro to remap SPS2's set background colour function.
|
|
Maximum number of vertices per VIF packet. The maximum number of vertices uploaded to VU memory for processing in one batch.
|