Class: Engine::ComputeShader

Inherits:
Object
  • Object
show all
Defined in:
lib/engine/compute_shader.rb

Class Method Summary collapse

Class Method Details

.new(shader_path) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/engine/compute_shader.rb', line 5

def self.new(shader_path)
  if OS.mac?
    metal_path = shader_path.sub(/\.(comp|glsl)$/, '.metal')
    Metal::ComputeShader.new(metal_path)
  else
    OpenGL::ComputeShader.new(shader_path)
  end
end