@@ -20,7 +20,7 @@ class ImageProcessingFilters < Propane::App
20
20
filters . each do |filter |
21
21
java_import format ( filter_format , filter )
22
22
end
23
- java_import ' com.jogamp.opengl.GL'
23
+ java_import com . jogamp . opengl . GL
24
24
25
25
GUI_WIDTH = 200
26
26
VIEW_WIDTH = 927
@@ -109,7 +109,7 @@ class ImageProcessingFilters < Propane::App
109
109
attr_reader :tex_A , :pg_src_A , :pg_src_B , :pg_src_C , :cp5 , :hide
110
110
attr_reader :pg_voronoi_centers , :laplace_weight
111
111
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
113
113
114
114
def settings
115
115
size VIEW_WIDTH , VIEW_HEIGHT , P2D
@@ -154,6 +154,12 @@ def setup
154
154
pg_voronoi_centers . point ( px + 0.5 , py + 0.5 )
155
155
end
156
156
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
157
163
control_panel do |c |
158
164
c . look_feel 'Nimbus'
159
165
c . title 'Filter Chooser and Settings'
@@ -165,17 +171,10 @@ def setup
165
171
c . checkbox :show_image , true
166
172
c . checkbox :show_geom , true
167
173
c . checkbox :animations , true
168
- @panel = c
169
174
end
170
- # frame_rate(60)
171
- frame_rate ( 1000 )
172
175
end
173
176
174
177
def draw
175
- unless hide
176
- @hide = true
177
- panel . set_visible ( hide )
178
- end
179
178
current = FILTERS . index ( filters )
180
179
convolution_kernel_index = conv_kernel_idx . to_i
181
180
gaussblur_sigma = blur_radius / 2.0
0 commit comments