Class: Mittsu::OpenGLLineBasicMaterial

Inherits:
OpenGLMaterial show all
Defined in:
lib/mittsu/renderers/opengl/materials/opengl_line_basic_material.rb

Instance Attribute Summary

Attributes inherited from OpenGLMaterial

#shader, #shadow_pass, #uniforms_list

Instance Method Summary collapse

Methods inherited from OpenGLMaterial

#clear_custom_attributes, #custom_attributes_dirty?, #init, #initialize, #needs_camera_position_uniform?, #needs_face_normals?, #needs_lights?, #needs_view_matrix_uniform?, #set

Constructor Details

This class inherits a constructor from Mittsu::OpenGLMaterial

Instance Method Details

#init_shaderObject



8
9
10
# File 'lib/mittsu/renderers/opengl/materials/opengl_line_basic_material.rb', line 8

def init_shader
  @shader = ShaderLib.create_shader(shader_id)
end

#refresh_uniforms(uniforms) ⇒ Object



3
4
5
6
# File 'lib/mittsu/renderers/opengl/materials/opengl_line_basic_material.rb', line 3

def refresh_uniforms(uniforms)
  uniforms['diffuse'].value = @material.color
  uniforms['opacity'].value = @material.opacity
end

#shader_idObject



12
13
14
# File 'lib/mittsu/renderers/opengl/materials/opengl_line_basic_material.rb', line 12

def shader_id
  :basic
end