mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
LUT info for Cg.
This commit is contained in:
parent
a13684c80c
commit
9c664b875a
@ -133,7 +133,7 @@ static unsigned cg_shader_num = 0;
|
||||
static struct gl_fbo_scale cg_scale[SSNES_CG_MAX_SHADERS];
|
||||
static unsigned fbo_smooth[SSNES_CG_MAX_SHADERS];
|
||||
|
||||
static unsigned lut_textures[MAX_TEXTURES];
|
||||
static GLuint lut_textures[MAX_TEXTURES];
|
||||
static unsigned lut_textures_num = 0;
|
||||
static char lut_textures_uniform[MAX_TEXTURES][64];
|
||||
|
||||
@ -1311,3 +1311,19 @@ void gl_cg_invalidate_context(void)
|
||||
cgCtx = NULL;
|
||||
}
|
||||
|
||||
unsigned gl_cg_get_lut_info(struct gl_cg_lut_info *info, unsigned elems)
|
||||
{
|
||||
if (!cg_active)
|
||||
return 0;
|
||||
|
||||
elems = elems > lut_textures_num ? lut_textures_num : elems;
|
||||
|
||||
for (unsigned i = 0; i < elems; i++)
|
||||
{
|
||||
strlcpy(info[i].id, lut_textures_uniform[i], sizeof(info[i].id));
|
||||
info[i].tex = lut_textures[i];
|
||||
}
|
||||
|
||||
return elems;
|
||||
}
|
||||
|
||||
|
@ -70,4 +70,12 @@ struct gl_cg_cgp_info
|
||||
bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info);
|
||||
void gl_cg_invalidate_context(void); // Call when resetting GL context on PS3.
|
||||
|
||||
struct gl_cg_lut_info
|
||||
{
|
||||
char id[64];
|
||||
GLuint tex;
|
||||
};
|
||||
|
||||
unsigned gl_cg_get_lut_info(struct gl_cg_lut_info *info, unsigned elems);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user