Skip to content

Commit

Permalink
gl: remove built-in 3D object draw methods
Browse files Browse the repository at this point in the history
gtkglext removed them.
  • Loading branch information
kou committed Sep 18, 2024
1 parent ebc31dd commit 3c2a646
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions lib/rabbit/renderer/gl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,73 +22,6 @@ def draw_slide(slide, simulation, &block)
end
end

def draw_cube(filled, x, y, z, size, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_cube(filled, size)
end
end

def draw_sphere(filled, x, y, z, radius, slices, stacks,
color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_sphere(filled, radius, slices, stacks)
end
end

def draw_cone(filled, x, y, z, base, height, slices, stacks,
color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_cone(filled, base, height, slices, stacks)
end
end

def draw_torus(filled, x, y, z, inner_radius, outer_radius,
n_sides, rings, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_torus(filled, inner_radius,
outer_radius, n_sides, rings)
end
end

def draw_tetrahedron(filled, x, y, z, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_tetrahedron(filled)
end
end

def draw_octahedron(filled, x, y, z, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_octahedron(filled)
end
end

def draw_dodecahedron(filled, x, y, z, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_dodecahedron(filled)
end
end

def draw_icosahedron(filled, x, y, z, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_icosahedron(filled)
end
end

def draw_teapot(filled, x, y, z, scale, color=nil, &block)
return super unless gl_available?
draw_gl(x, y, z, color, block) do
::Gdk::GL.draw_teapot(filled, scale)
end
end

def gl_compile(id)
return super unless gl_available?
::GL.NewList(id, ::GL::COMPILE)
Expand Down

0 comments on commit 3c2a646

Please sign in to comment.