RetroArch
Functions | Variables
cg2glsl Namespace Reference

Functions

def log (*arg)
 
def keep_line_if (func, lines)
 
def remove_comments (source_lines)
 
def defines_var (line)
 
def replace_by_table (source, table)
 
def replace_global_in (source)
 
def replace_global_vertex (source)
 
def translate_varyings (varyings, source, direction)
 
def no_uniform (elem)
 
def destructify_varyings (source, direction)
 
def translate (cg, translations)
 
def translate_varying (cg)
 
def translate_texture_size (cg)
 
def replace_varyings (source)
 
def fix_samplers (log_prefix, ref_index, source)
 
def hack_source_vertex (source)
 
def replace_global_fragment (source)
 
def translate_texture (cg)
 
def hack_source_fragment (source)
 
def validate_shader (source, target)
 
def preprocess_vertex (source_data)
 
def convert (source, dest)
 
def convert_cgp (source, dest)
 
def path_ext (path)
 
def convert_path (source, source_dir, dest_dir, conv)
 
def main ()
 

Variables

bool batch_mode = False
 

Detailed Description

Python 3 script which converts simple RetroArch Cg shaders to modern GLSL (ES) format.
Author: Hans-Kristian Arntzen (Themaister)
License: Public domain

Function Documentation

◆ convert()

def cg2glsl.convert (   source,
  dest 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert_cgp()

def cg2glsl.convert_cgp (   source,
  dest 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert_path()

def cg2glsl.convert_path (   source,
  source_dir,
  dest_dir,
  conv 
)
Here is the caller graph for this function:

◆ defines_var()

def cg2glsl.defines_var (   line)
Here is the caller graph for this function:

◆ destructify_varyings()

def cg2glsl.destructify_varyings (   source,
  direction 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fix_samplers()

def cg2glsl.fix_samplers (   log_prefix,
  ref_index,
  source 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hack_source_fragment()

def cg2glsl.hack_source_fragment (   source)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hack_source_vertex()

def cg2glsl.hack_source_vertex (   source)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ keep_line_if()

def cg2glsl.keep_line_if (   func,
  lines 
)
Here is the caller graph for this function:

◆ log()

def cg2glsl.log ( arg)
Here is the caller graph for this function:

◆ main()

def cg2glsl.main ( void  )
Here is the call graph for this function:

◆ no_uniform()

def cg2glsl.no_uniform (   elem)

◆ path_ext()

def cg2glsl.path_ext (   path)
Here is the caller graph for this function:

◆ preprocess_vertex()

def cg2glsl.preprocess_vertex (   source_data)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_comments()

def cg2glsl.remove_comments (   source_lines)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_by_table()

def cg2glsl.replace_by_table (   source,
  table 
)
Here is the caller graph for this function:

◆ replace_global_fragment()

def cg2glsl.replace_global_fragment (   source)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_global_in()

def cg2glsl.replace_global_in (   source)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_global_vertex()

def cg2glsl.replace_global_vertex (   source)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_varyings()

def cg2glsl.replace_varyings (   source)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ translate()

def cg2glsl.translate (   cg,
  translations 
)
Here is the caller graph for this function:

◆ translate_texture()

def cg2glsl.translate_texture (   cg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ translate_texture_size()

def cg2glsl.translate_texture_size (   cg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ translate_varying()

def cg2glsl.translate_varying (   cg)
Here is the call graph for this function:

◆ translate_varyings()

def cg2glsl.translate_varyings (   varyings,
  source,
  direction 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_shader()

def cg2glsl.validate_shader (   source,
  target 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ batch_mode

bool cg2glsl.batch_mode = False