Bugs: Browse | Submit New | Admin

[#25868] Problems using the glFrustum function

Date:
2009-05-11 10:31
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Problems using the glFrustum function

Detailed description
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: Notepad

Please login


Followup

Message
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


Attached Files:

Name Description Download
3dvis.rb Example code Download

Changes:

Field Old Value Date By
File Added4530: 3dvis.rb2009-05-11 10:31None