libdragon
rdp.h
Go to the documentation of this file.
00001 
00006 #ifndef __LIBDRAGON_RDP_H
00007 #define __LIBDRAGON_RDP_H
00008 
00009 #include "display.h"
00010 #include "graphics.h"
00011 
00020 typedef enum
00021 {
00023     MIRROR_DISABLED,
00025     MIRROR_ENABLED
00026 } mirror_t;
00027 
00031 typedef enum
00032 {
00034     SYNC_FULL,
00036     SYNC_PIPE,
00038     SYNC_LOAD,
00040     SYNC_TILE
00041 } sync_t;
00042 
00046 typedef enum
00047 {
00049     FLUSH_STRATEGY_NONE,
00051     FLUSH_STRATEGY_AUTOMATIC
00052 } flush_t;
00053 
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059 
00060 void rdp_init( void );
00061 void rdp_attach_display( display_context_t disp );
00062 void rdp_detach_display( void );
00063 void rdp_sync( sync_t sync );
00064 void rdp_set_clipping( uint32_t tx, uint32_t ty, uint32_t bx, uint32_t by );
00065 void rdp_set_default_clipping( void );
00066 void rdp_enable_primitive_fill( void );
00067 void rdp_enable_texture_copy( void );
00068 uint32_t rdp_load_texture( uint32_t texslot, uint32_t texloc, mirror_t mirror_enabled, sprite_t *sprite );
00069 uint32_t rdp_load_texture_stride( uint32_t texslot, uint32_t texloc, mirror_t mirror_enabled, sprite_t *sprite, int offset );
00070 void rdp_draw_textured_rectangle( uint32_t texslot, int tx, int ty, int bx, int by );
00071 void rdp_draw_textured_rectangle_scaled( uint32_t texslot, int tx, int ty, int bx, int by, double x_scale, double y_scale );
00072 void rdp_draw_sprite( uint32_t texslot, int x, int y );
00073 void rdp_draw_sprite_scaled( uint32_t texslot, int x, int y, double x_scale, double y_scale );
00074 void rdp_set_primitive_color( uint32_t color );
00075 void rdp_draw_filled_rectangle( int tx, int ty, int bx, int by );
00076 void rdp_set_texture_flush( flush_t flush );
00077 void rdp_close( void );
00078 
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082 
00083 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines