RetroArch
Macros | Functions
vita2d_texture.c File Reference
#include <psp2/kernel/sysmem.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "vita2d.h"
#include "utils.h"
#include "shared.h"
Include dependency graph for vita2d_texture.c:

Macros

#define GXM_TEX_MAX_SIZE   4096
 

Functions

static int tex_format_to_bytespp (SceGxmTextureFormat format)
 
vita2d_texturevita2d_create_empty_texture (unsigned int w, unsigned int h)
 
vita2d_texturevita2d_create_empty_texture_format (unsigned int w, unsigned int h, SceGxmTextureFormat format)
 
void vita2d_free_texture (vita2d_texture *texture)
 
unsigned int vita2d_texture_get_width (const vita2d_texture *texture)
 
unsigned int vita2d_texture_get_height (const vita2d_texture *texture)
 
unsigned int vita2d_texture_get_stride (const vita2d_texture *texture)
 
SceGxmTextureFormat vita2d_texture_get_format (const vita2d_texture *texture)
 
voidvita2d_texture_get_datap (const vita2d_texture *texture)
 
voidvita2d_texture_get_palette (const vita2d_texture *texture)
 
SceGxmTextureFilter vita2d_texture_get_min_filter (const vita2d_texture *texture)
 
SceGxmTextureFilter vita2d_texture_get_mag_filter (const vita2d_texture *texture)
 
void vita2d_texture_set_filters (vita2d_texture *texture, SceGxmTextureFilter min_filter, SceGxmTextureFilter mag_filter)
 
static void set_texture_program ()
 
static void set_texture_tint_program ()
 
static void set_texture_wvp_uniform ()
 
static void set_texture_tint_color_uniform (unsigned int color)
 
static void draw_texture_generic (const vita2d_texture *texture, float x, float y)
 
void vita2d_draw_texture (const vita2d_texture *texture, float x, float y)
 
void vita2d_draw_texture_tint (const vita2d_texture *texture, float x, float y, unsigned int color)
 
void vita2d_draw_texture_rotate (const vita2d_texture *texture, float x, float y, float rad)
 
void vita2d_draw_texture_tint_rotate (const vita2d_texture *texture, float x, float y, float rad, unsigned int color)
 
static void draw_texture_rotate_hotspot_generic (const vita2d_texture *texture, float x, float y, float rad, float center_x, float center_y)
 
void vita2d_draw_texture_rotate_hotspot (const vita2d_texture *texture, float x, float y, float rad, float center_x, float center_y)
 
void vita2d_draw_texture_tint_rotate_hotspot (const vita2d_texture *texture, float x, float y, float rad, float center_x, float center_y, unsigned int color)
 
static void draw_texture_scale_generic (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale)
 
void vita2d_draw_texture_scale (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale)
 
void vita2d_draw_texture_tint_scale (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, unsigned int color)
 
static void draw_texture_part_generic (const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h)
 
void vita2d_draw_texture_part (const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h)
 
void vita2d_draw_texture_tint_part (const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, unsigned int color)
 
static void draw_texture_part_scale_generic (const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale)
 
void vita2d_draw_texture_part_scale (const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale)
 
void vita2d_draw_texture_tint_part_scale (const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, unsigned int color)
 
static void draw_texture_scale_rotate_hotspot_generic (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, float center_x, float center_y)
 
void vita2d_draw_texture_scale_rotate_hotspot (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, float center_x, float center_y)
 
void vita2d_draw_texture_scale_rotate (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad)
 
void vita2d_draw_texture_tint_scale_rotate_hotspot (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, float center_x, float center_y, unsigned int color)
 
void vita2d_draw_texture_tint_scale_rotate (const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, unsigned int color)
 
void vita2d_texture_set_wvp (float x, float y, float width, float height)
 
void vita2d_texture_set_program ()
 
void vita2d_texture_set_tint_program ()
 
void vita2d_texture_set_tint_color_uniform (unsigned int color)
 
void vita2d_draw_texture_part_generic (const vita2d_texture *texture, SceGxmPrimitiveType type, vita2d_texture_vertex *vertices, unsigned int num_vertices)
 

Macro Definition Documentation

◆ GXM_TEX_MAX_SIZE

#define GXM_TEX_MAX_SIZE   4096

Function Documentation

◆ draw_texture_generic()

static void draw_texture_generic ( const vita2d_texture texture,
float  x,
float  y 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_texture_part_generic()

static void draw_texture_part_generic ( const vita2d_texture texture,
float  x,
float  y,
float  tex_x,
float  tex_y,
float  tex_w,
float  tex_h 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_texture_part_scale_generic()

static void draw_texture_part_scale_generic ( const vita2d_texture texture,
float  x,
float  y,
float  tex_x,
float  tex_y,
float  tex_w,
float  tex_h,
float  x_scale,
float  y_scale 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_texture_rotate_hotspot_generic()

static void draw_texture_rotate_hotspot_generic ( const vita2d_texture texture,
float  x,
float  y,
float  rad,
float  center_x,
float  center_y 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_texture_scale_generic()

static void draw_texture_scale_generic ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_texture_scale_rotate_hotspot_generic()

static void draw_texture_scale_rotate_hotspot_generic ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale,
float  rad,
float  center_x,
float  center_y 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_texture_program()

static void set_texture_program ( )
inlinestatic
Here is the caller graph for this function:

◆ set_texture_tint_color_uniform()

static void set_texture_tint_color_uniform ( unsigned int  color)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_texture_tint_program()

static void set_texture_tint_program ( )
inlinestatic
Here is the caller graph for this function:

◆ set_texture_wvp_uniform()

static void set_texture_wvp_uniform ( )
inlinestatic
Here is the caller graph for this function:

◆ tex_format_to_bytespp()

static int tex_format_to_bytespp ( SceGxmTextureFormat  format)
static
Here is the caller graph for this function:

◆ vita2d_create_empty_texture()

vita2d_texture* vita2d_create_empty_texture ( unsigned int  w,
unsigned int  h 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_create_empty_texture_format()

vita2d_texture* vita2d_create_empty_texture_format ( unsigned int  w,
unsigned int  h,
SceGxmTextureFormat  format 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture()

void vita2d_draw_texture ( const vita2d_texture texture,
float  x,
float  y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_part()

void vita2d_draw_texture_part ( const vita2d_texture texture,
float  x,
float  y,
float  tex_x,
float  tex_y,
float  tex_w,
float  tex_h 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_part_generic()

void vita2d_draw_texture_part_generic ( const vita2d_texture texture,
SceGxmPrimitiveType  type,
vita2d_texture_vertex vertices,
unsigned int  num_vertices 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_part_scale()

void vita2d_draw_texture_part_scale ( const vita2d_texture texture,
float  x,
float  y,
float  tex_x,
float  tex_y,
float  tex_w,
float  tex_h,
float  x_scale,
float  y_scale 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_rotate()

void vita2d_draw_texture_rotate ( const vita2d_texture texture,
float  x,
float  y,
float  rad 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_rotate_hotspot()

void vita2d_draw_texture_rotate_hotspot ( const vita2d_texture texture,
float  x,
float  y,
float  rad,
float  center_x,
float  center_y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_scale()

void vita2d_draw_texture_scale ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_scale_rotate()

void vita2d_draw_texture_scale_rotate ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale,
float  rad 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_scale_rotate_hotspot()

void vita2d_draw_texture_scale_rotate_hotspot ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale,
float  rad,
float  center_x,
float  center_y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_tint()

void vita2d_draw_texture_tint ( const vita2d_texture texture,
float  x,
float  y,
unsigned int  color 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_tint_part()

void vita2d_draw_texture_tint_part ( const vita2d_texture texture,
float  x,
float  y,
float  tex_x,
float  tex_y,
float  tex_w,
float  tex_h,
unsigned int  color 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_tint_part_scale()

void vita2d_draw_texture_tint_part_scale ( const vita2d_texture texture,
float  x,
float  y,
float  tex_x,
float  tex_y,
float  tex_w,
float  tex_h,
float  x_scale,
float  y_scale,
unsigned int  color 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_tint_rotate()

void vita2d_draw_texture_tint_rotate ( const vita2d_texture texture,
float  x,
float  y,
float  rad,
unsigned int  color 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_tint_rotate_hotspot()

void vita2d_draw_texture_tint_rotate_hotspot ( const vita2d_texture texture,
float  x,
float  y,
float  rad,
float  center_x,
float  center_y,
unsigned int  color 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_tint_scale()

void vita2d_draw_texture_tint_scale ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale,
unsigned int  color 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_draw_texture_tint_scale_rotate()

void vita2d_draw_texture_tint_scale_rotate ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale,
float  rad,
unsigned int  color 
)
Here is the call graph for this function:

◆ vita2d_draw_texture_tint_scale_rotate_hotspot()

void vita2d_draw_texture_tint_scale_rotate_hotspot ( const vita2d_texture texture,
float  x,
float  y,
float  x_scale,
float  y_scale,
float  rad,
float  center_x,
float  center_y,
unsigned int  color 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_free_texture()

void vita2d_free_texture ( vita2d_texture texture)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_texture_get_datap()

void* vita2d_texture_get_datap ( const vita2d_texture texture)
Here is the caller graph for this function:

◆ vita2d_texture_get_format()

SceGxmTextureFormat vita2d_texture_get_format ( const vita2d_texture texture)
Here is the caller graph for this function:

◆ vita2d_texture_get_height()

unsigned int vita2d_texture_get_height ( const vita2d_texture texture)
Here is the caller graph for this function:

◆ vita2d_texture_get_mag_filter()

SceGxmTextureFilter vita2d_texture_get_mag_filter ( const vita2d_texture texture)

◆ vita2d_texture_get_min_filter()

SceGxmTextureFilter vita2d_texture_get_min_filter ( const vita2d_texture texture)

◆ vita2d_texture_get_palette()

void* vita2d_texture_get_palette ( const vita2d_texture texture)

◆ vita2d_texture_get_stride()

unsigned int vita2d_texture_get_stride ( const vita2d_texture texture)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_texture_get_width()

unsigned int vita2d_texture_get_width ( const vita2d_texture texture)
Here is the caller graph for this function:

◆ vita2d_texture_set_filters()

void vita2d_texture_set_filters ( vita2d_texture texture,
SceGxmTextureFilter  min_filter,
SceGxmTextureFilter  mag_filter 
)
Here is the caller graph for this function:

◆ vita2d_texture_set_program()

void vita2d_texture_set_program ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_texture_set_tint_color_uniform()

void vita2d_texture_set_tint_color_uniform ( unsigned int  color)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vita2d_texture_set_tint_program()

void vita2d_texture_set_tint_program ( )
Here is the call graph for this function:

◆ vita2d_texture_set_wvp()

void vita2d_texture_set_wvp ( float  x,
float  y,
float  width,
float  height 
)

ADVANCED

Here is the call graph for this function:
Here is the caller graph for this function: