From: Chris Morris Date: 2001-11-13T12:45:33+09:00 Subject: [ruby-talk:24976] RE: FXGLViewer - rotate a primitive? > ....open it up and eyeball this line: > > gp2.append(FXGLCylinder.new(-1.0, 0.5, 0.0, 1.0, 0.5)) > > Now suppose I feel that vertical cylinders are boring. I want to > rotate this cylinder (not the whole scene - just the cylinder) 30 > degrees over. > > Does OpenGL miss this simple ability? The concept I'm trying to match > is POVray script, which rotates all the time as part of Composite > Solid Geometry. IIRC, you have to use the matrix stack. Start, push state onto the stack, do your transforms, scales and rotations for your current object, then render it, then pop state off the stack to return to your starting point and go again for the next object. It doesn't keep track of your objects for you. Once it's rendered, OpenGL's broken it down into pixels, so it doesn't know it as a cylinder anymore. (It will track a user-defined value per pixel when it renders each object to assist with interactivity (eg - "Hey, OpenGL, what user-defined value is at x,y,z?" "I rendered your object ID 235 at that pixel" -- well, something along those lines.)) Chris