@@ -20,7 +20,7 @@ class ImageProcessingFilters < Propane::App
2020 filters . each do |filter |
2121 java_import format ( filter_format , filter )
2222 end
23- java_import ' com.jogamp.opengl.GL'
23+ java_import com . jogamp . opengl . GL
2424
2525 GUI_WIDTH = 200
2626 VIEW_WIDTH = 927
@@ -109,7 +109,7 @@ class ImageProcessingFilters < Propane::App
109109 attr_reader :tex_A , :pg_src_A , :pg_src_B , :pg_src_C , :cp5 , :hide
110110 attr_reader :pg_voronoi_centers , :laplace_weight
111111 attr_reader :show_geom , :show_image , :animations , :passes
112- attr_reader :rs , :vel , :pos , :panel , : filters, :blur_radius , :conv_kernel_idx
112+ attr_reader :rs , :vel , :pos , :filters , :blur_radius , :conv_kernel_idx
113113
114114 def settings
115115 size VIEW_WIDTH , VIEW_HEIGHT , P2D
@@ -154,6 +154,12 @@ def setup
154154 pg_voronoi_centers . point ( px + 0.5 , py + 0.5 )
155155 end
156156 pg_voronoi_centers . end_draw
157+ setup_control_panel
158+ # frame_rate(60)
159+ frame_rate ( 1000 )
160+ end
161+
162+ def setup_control_panel
157163 control_panel do |c |
158164 c . look_feel 'Nimbus'
159165 c . title 'Filter Chooser and Settings'
@@ -165,17 +171,10 @@ def setup
165171 c . checkbox :show_image , true
166172 c . checkbox :show_geom , true
167173 c . checkbox :animations , true
168- @panel = c
169174 end
170- # frame_rate(60)
171- frame_rate ( 1000 )
172175 end
173176
174177 def draw
175- unless hide
176- @hide = true
177- panel . set_visible ( hide )
178- end
179178 current = FILTERS . index ( filters )
180179 convolution_kernel_index = conv_kernel_idx . to_i
181180 gaussblur_sigma = blur_radius / 2.0
0 commit comments