Skip to content

Instantly share code, notes, and snippets.

@moumar
Created April 7, 2009 14:46
Show Gist options
  • Select an option

  • Save moumar/91262 to your computer and use it in GitHub Desktop.

Select an option

Save moumar/91262 to your computer and use it in GitHub Desktop.
# rp5
load_library 'opengl'
import "processing.opengl"
def setup
size 640, 480, OPENGL
smooth
end
def draw
lights
background(200)
fill(100)
translate(width/2, height/2)
rotate_x(1)
rotate_y(1)
box(150)
end
=begin
all tests made against ruby-processing 1.0.6
this sketch will works with
size 640, 480, P3D
but not with
size 640, 480, OPENGL
after applying this patch:
<patch>
diff --git a/lib/ruby-processing/app.rb b/lib/ruby-processing/app.rb
index 43c5066..18c3c97 100644
--- a/lib/ruby-processing/app.rb
+++ b/lib/ruby-processing/app.rb
@@ -372,7 +372,7 @@ module Processing
# Tests to see which display method should run.
def determine_how_to_display
# Wait for init to get its grey tracksuit on and run a few laps.
- sleep 0.02 while default_size? && !finished? && !@@full_screen
+ #sleep 0.02 while default_size? && !finished? && !@@full_screen
if online?
display_in_an_applet
</patch>
the sketch loads but the size is stuck at the default dimensions
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment