Bug 34 - glutWireCube / glutSolidCube generate wrong cubes
Summary: glutWireCube / glutSolidCube generate wrong cubes
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
Depends on:
Reported: 2003-08-12 09:03 CEST by Sven Gothel
Modified: 2010-03-24 07:45 CET (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:45:48 CET

---- Reported by printezis 2003-08-12 09:03:21 ----

The GLUT.glutWireCube and GLUT.glutSolidCube methods generate wrongly-sized
cubes after the first invocation. The reason is that the drawBox method that
they both
call stores the vertices of the first cube drawn and reuses them in subsequent
invocations. I was surprised it was written this way!

The solution is either to regenerate the vertices every time or to generate
vertices of 
a cube of size 1.0 once and then scale it according to the requested size.

---- Additional Comments From kbr 2004-10-05 15:01:50 ----

Fixed by rescaling unit vertices each time drawBox() is called.

--- Bug imported by sgothel@jausoft.com 2010-03-24 07:45 EDT  ---

This bug was previously known as _bug_ 34 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=34