Class: RLSL::Prism::Emitters::GLSLEmitter

Inherits:
TargetEmitter show all
Defined in:
lib/rlsl/prism/emitters/glsl_emitter.rb

Constant Summary collapse

PROFILE =
TargetProfile.new(
  type_map: {
    float: "float",
    int: "int",
    bool: "bool",
    vec2: "vec2",
    vec3: "vec3",
    vec4: "vec4",
    mat2: "mat2",
    mat3: "mat3",
    mat4: "mat4",
    sampler2D: "sampler2D"
  },
  vector_constructors: {
    vec2: "vec2",
    vec3: "vec3",
    vec4: "vec4"
  },
  matrix_constructors: {
    mat2: "mat2",
    mat3: "mat3",
    mat4: "mat4"
  },
  texture_functions: {
    texture2D: "texture2D",
    texture: "texture",
    textureLod: "textureLod"
  }
).freeze

Constants inherited from BaseEmitter

BaseEmitter::MULTILINE_NODES, BaseEmitter::PRECEDENCE

Instance Attribute Summary

Attributes inherited from BaseEmitter

#indent_level

Method Summary

Methods inherited from BaseEmitter

#emit, #initialize

Methods included from BaseEmitter::StatementEmission

#emit_block, #emit_branch, #emit_indented_block, #emit_statement, #emit_statements, #emit_terminal_statement

Methods included from BaseEmitter::DefinitionEmission

#current_return_struct_name, #emit_array_literal, #emit_for_static_init, #emit_function_definition, #emit_global_decl, #emit_multiple_assignment, #emit_result_struct

Methods included from BaseEmitter::ExpressionEmission

#emit_array_index, #emit_assignment, #emit_binary_op, #emit_bool_literal, #emit_constant, #emit_field_access, #emit_func_call, #emit_literal, #emit_parenthesized, #emit_swizzle, #emit_ternary, #emit_unary_op, #emit_var_decl, #emit_var_ref

Methods included from BaseEmitter::ControlFlowEmission

#elsif_node?, #emit_break, #emit_conditional, #emit_elsif, #emit_for_loop, #emit_if_statement, #emit_return, #emit_tuple_return, #emit_while_loop

Constructor Details

This class inherits a constructor from RLSL::Prism::Emitters::BaseEmitter