Bugs: Browse | Submit New | Admin
While trying to implement an example program from a book (translating it from C), I got the following message: get fences failed: -1 param: 6, val: 0 /home/david/NetBeansProjects/3dvis/lib/3dvis.rb:56:in `glFrustum': invalid value (Gl::Error) from /home/david/NetBeansProjects/3dvis/lib/3dvis.rb:56:in `init' from /home/david/NetBeansProjects/3dvis/lib/3dvis.rb:28:in `initialize' from /home/david/NetBeansProjects/3dvis/lib/3dvis.rb:77:in `new' from /home/david/NetBeansProjects/3dvis/lib/3dvis.rb:77 Checking the documentation for the glFrustum function, the "invalid value" error raises when "znear" or "zfar" have a negative value. Kinda weird since the variables that are send to the function have positive values. The script code is atached. I'm using ruby-opengl-0.60.1.gem with ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
Add A Comment:
Date: 2009-05-11 12:35 Sender: Jan Dvorak You are passing uninitialized variables. Instead of glFrustum @xwmin, @xwmax, @ywmin, @ywmax, @dnear, @dfar it should be glFrustum @xmin, @xmax, @ymin, @ymax, @dnear, @dfar